Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save smtchahal/f8827ab88d493d5feef0a383c4800d18 to your computer and use it in GitHub Desktop.
Save smtchahal/f8827ab88d493d5feef0a383c4800d18 to your computer and use it in GitHub Desktop.
Bookmarklet to enable right-click & copy-paste
javascript:Array.from(document.getElementsByTagName('*')).forEach(elm => { elm.addEventListener('contextmenu', evt => { evt.stopPropagation(); return true; }, true); elm.addEventListener('paste', evt => { evt.stopPropagation(); return true; }, true); });
Array.from(document.getElementsByTagName('*')).forEach(elm => {
elm.addEventListener('contextmenu', evt => {
evt.stopPropagation();
return true;
}, true);
elm.addEventListener('paste', evt => {
evt.stopPropagation();
return true;
}, true);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment