Skip to content

Instantly share code, notes, and snippets.

@wparad
Created March 4, 2016 01:19
Show Gist options
  • Save wparad/a880bec712d8912ba88e to your computer and use it in GitHub Desktop.
Save wparad/a880bec712d8912ba88e to your computer and use it in GitHub Desktop.
Wipe out an entire HTML page using javascript
<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