usatoday

usatoday

usatoday cHeight)){ bElem.style.height = (frameC.scrollHeight) + “px”; frameM.style.height = (frameC.scrollHeight) + “px”; } } }catch(err){} if(window.outerWidth>(document.body.clientWidth*window.devicePixelRatio)){ document.getElementById(“imgResize”).style.display = “block”; $(“#resize”).attr(“src”,”./ee/_nmum/full-screen-on.png”); }else{ document.getElementById(“imgResize”).style.display = “none”; document.getElementById(“resize”).src = “”; } } /* Get into full screen */ function GoInFullscreen(element) { if(element.requestFullscreen) element.requestFullscreen(); else if(element.mozRequestFullScreen) element.mozRequestFullScreen(); else if(element.webkitRequestFullscreen) element.webkitRequestFullscreen(); else if(element.msRequestFullscreen) element.msRequestFullscreen(); } /* Get out of full screen */ function GoOutFullscreen() { if(document.exitFullscreen) document.exitFullscreen(); else if(document.mozCancelFullScreen) document.mozCancelFullScreen(); else if(document.webkitExitFullscreen) document.webkitExitFullscreen(); else if(document.msExitFullscreen) document.msExitFullscreen(); } /* Is currently in full screen or not */ function IsFullScreenCurrently() { var full_screen_element = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || null; // If no element is in full-screen if(full_screen_element === null) return false; else return true; } function resizeBody(){ if(IsFullScreenCurrently()){ GoOutFullscreen(); $(“#resize”).attr(“src”,”./ee/_nmum/full-screen-on.png”); }else{ GoInFullscreen($(“body”).get(0)); $(“#resize”).attr(“src”,”./ee/_nmum/full-screen-off.png”); } } function loadinFrame(){ var frameSrc = “//usatoday-va.newsmemory.com/ee/_nmum/_default_bb_include_inframe.php?pSetup=usatoday_charityfund&isFrame=1”; // USING NEW MOBILE SPLASH PAGE 20150203 // //Include js variables to the frame if(document.compatMode){ frameSrc += (“&docMode=”+document.compatMode); } document.getElementById(“mainframe”).src = frameSrc; if(window.outerWidth>(document.body.clientWidth*window.devicePixelRatio)){ document.getElementById(“imgResize”).style.display = “block”; $(“#resize”).attr(“src”,”./ee/_nmum/full-screen-on.png”); } } function receiveMessageCookieGet(event){ var referrer = document.referrer.split(‘/’); var referrerDomain = referrer[0]+’/’+referrer[1]+’/’+referrer[2]; if (event.origin !== referrerDomain)return; var dataObj = JSON.parse(event.data); if (dataObj.action == “cookie_get”){ mFrame.contentWindow.receiveMessageCookieGet(dataObj.value); } } //Set the listener for window changes window.onload = new function(){ loadinFrame(); window.addEventListener(“message”, receiveMessageCookieGet, false); }; var mFrame = document.getElementById(“mainframe”); mFrame.onload = mFrame.onreadystatechange = window.onresize = resizeContent; ]]>

Related Post

Be the first to comment

Leave a Reply

Your email address will not be published.


*