Last active
March 10, 2017 12:03
-
-
Save ollicle/ee02a5e666781a32ec9c49fc73debdff to your computer and use it in GitHub Desktop.
Load the current document into a resizable 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
(function(){ | |
document.body.innerHTML = ''; | |
document.head.innerHTML = ''; | |
var i = document.createElement('iframe'); | |
i.id='theiframe'; | |
i.style.width = '100%'; | |
i.style.height='100%'; | |
i.src = '?'; | |
var wrap = document.createElement('div'); | |
wrap.style.margin = 'auto'; | |
wrap.style.width = '90vh'; | |
wrap.style.height = '90vh'; | |
wrap.style.resize = 'both'; | |
wrap.style.overflow = 'hidden'; | |
wrap.appendChild(i); | |
document.body.appendChild(wrap); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment