Commit a92ec52d authored by  JosephK's avatar JosephK
Browse files

Fix pageLang undefined (grmpf) + iframe style

parent fd3b2b75
Pipeline #42693 failed with stages
in 28 seconds
......@@ -261,12 +261,15 @@
const referrer = (document.referrer.split('/')[2] !== undefined) ? document.referrer.split('/')[2] : '';
const iframe = document.createElement('iframe');
iframe.width = w;
iframe.height = h;
iframe.style = `width: ${w}px; height: ${h}px;`;
iframe.width = w; iframe.height = h;
iframe.frameborder = '0'; iframe.marginwidth = '0'; iframe.marginheight = '0';
iframe.vspace = '0'; iframe.hspace = '0';
iframe.allowtransparency = 'true'; iframe.scrolling = 'no';
iframe.style = `width: ${w}px; height: ${h}px; border: none;`;
iframe.src = `${sense3Baseurl}sense3.html#${s.pageLang()};${tags};${colors};${id};${referrer}`;
iframe.className = 'sense3';
iframe.id = `sense3_${i}`;
console.log(iframe);
if (!document.getElementById(`sense3_${i}`)) {
scripts[i].parentNode.insertBefore(iframe, scripts[i].nextSibling);
}
......@@ -418,9 +421,9 @@
lang = meta[i].getAttribute('content');
}
}
} else {
lang = 'en';
}
lang = (lang !== '' ) ? lang : 'en';
return lang.substr(0, 2).toLowerCase();
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment