Last active
January 20, 2020 04:16
-
-
Save bayareawebpro/81d8d8d6cfd10c0d08d6cc05636ab756 to your computer and use it in GitHub Desktop.
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> | |
window.addEventListener('beforeunload', function (e) { | |
// Cancel the event | |
e.preventDefault(); | |
// Chrome requires returnValue to be set | |
e.returnValue = ''; | |
// This message may not be shown to the user / vendor specific message may be used... | |
window.confirm("Are you sure?"); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment