Created
March 4, 2016 01:19
-
-
Save wparad/a880bec712d8912ba88e to your computer and use it in GitHub Desktop.
Wipe out an entire HTML page using javascript
This file contains 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
<script> | |
setTimeout(() => { | |
document.title = "I replaced this."; | |
$('body').empty(); | |
$('head').empty(); | |
document.getElementsByTagName("body")[0].innerHTML = "Hello. I'm all that's here."; | |
}, 100); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment