Created
July 7, 2017 01:55
-
-
Save richard512/accd9b489c655bf159fcd9be9e099b7f to your computer and use it in GitHub Desktop.
re-enable right click (bookmarklet)
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
javascript:(function(w){ | |
var arr = ['contextmenu','copy','cut','paste','mousedown','mouseup','beforeunload','beforeprint']; | |
for(var i = 0, x; x = arr[i]; i++){ | |
if(w['on' + x])w['on' + x] = null; | |
w.addEventListener(x, function(e){e.stopPropagation()}, true); | |
}; | |
for(var j = 0, f; f = w.frames[j]; j++){try{arguments.callee(f)}catch(e){}}})(window); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment