Last active
May 22, 2017 17:54
-
-
Save andreasvirkus/551a1903e5a18119cbd8ac460ded5d7a to your computer and use it in GitHub Desktop.
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
// This is all it takes to create those cancerous popups. | |
window.onbeforeunload = function (e) { | |
e = e || window.event; | |
// For IE and Firefox prior to version 4 | |
if (e) { | |
e.returnValue = 'Sure?'; | |
} | |
// For Safari | |
return 'Sure?'; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment