// define the document domain , must be the same line found // in the iframe header for security reasons document.domain = window.location.hostname; // iframe configuration var iframe,innerDoc; iframe = document.createElement('iframe'); iframe.id = 'widget-box'; iframe.src = 'https://megri.com/today-history/home/index'; iframe.frameBorder = 0; iframe.outline = 'none'; iframe.style.background = 'transparent'; iframe.style.outline = 'none'; iframe.style.overflow = 'hidden'; iframe.style.height = '200px'; iframe.style.margin = 0; iframe.style.padding = 0; iframe.style.display = 'block'; iframe.style.borderRadius = '4px 4px 0px 0px'; iframe.style.mozBorderRadius = '4px 4px 0px 0px'; iframe.style.webkitBorderRadius = '4px 4px 0px 0px'; iframe.display = true; if (iframe.display) { window.onload = function(){ document.getElementById('block-widget-container').innerHTML = ''; document.getElementById('block-widget-container').appendChild(iframe); }; }