Skip to content

Instantly share code, notes, and snippets.

@nbouliol
Created June 11, 2020 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nbouliol/1386211faabd7d991d13a07ed352c2ca to your computer and use it in GitHub Desktop.
Save nbouliol/1386211faabd7d991d13a07ed352c2ca to your computer and use it in GitHub Desktop.
Allow copy/paste on websites that disable it
var allow = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('paste', allow, true);
document.addEventListener('copy', allow, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment