html, body { height: 100%; margin: 0; overflow: hidden; padding: 0; width:
100%; } iframe { border: 0 none; display: block; height: 100%; margin: 0;
outline: none; padding: 0; width: 100vw; } function initPage() { const urlPath
= window.location.pathname || ''; const langLocRegex = new
RegExp('^/([a-z][a-z])/([a-z][a-z])/', 'gi'); const langLocMatch =
urlPath.match(langLocRegex); let iframeSrc = 'info/error/500'; if
(!langLocMatch) { iframeSrc = '/en/us/' + iframeSrc; } else { iframeSrc =
langLocMatch + iframeSrc; } const iframe = document.getElementById('error');
iframe.src = iframeSrc; } function openIframeLink(url, newTab) { if (newTab) {
// if we cannot open link in new tab (popup blocker browser setting, just open
in current tab) if (!window.open(url, '_blank')) window.location = url; } else
window.location = url; } window.addEventListener('message', function (e) {
switch (e.data.name) { case 'iframeNavigationTriggered':
openIframeLink(e.data.url, e.data.newTab); break; case 'iframeSetParentTitle':
document.title = e.data.title; break; default: // Unrecognized iframe to
parent message with name } }, false);