Last active
August 29, 2015 14:04
-
-
Save buley/6f40aad6552489d08357 to your computer and use it in GitHub Desktop.
self-expanding iframe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.parent.document.body.style.height = window.parent.innerHeight + 'px'; | |
window.parent.document.getElementsByTagName('iframe')[0].setAttribute('height', window.parent.document.body.clientHeight +'px'); | |
window.parent.document.getElementsByTagName('iframe')[0].setAttribute('width', window.parent.document.body.clientWidth + 'px'); | |
window.document.getElementById("application-ad-handle").style.margin = ((document.body.clientHeight - window.document.getElementById("application-ad-handle").clientHeight)/2) + 'px auto 0 auto'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment