Created
October 27, 2016 14:13
-
-
Save douglascabral/a1d277ee48e4c829756155f3d10bda61 to your computer and use it in GitHub Desktop.
Avoid the F5 in webpage
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
// @see http://jsfiddle.net/SpYk3/C85Hs/ | |
function disableF5(e) { if ((e.which || e.keyCode) == 116) e.preventDefault(); }; | |
document.addEventListener('keydown', disableF5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment