Skip to content

Instantly share code, notes, and snippets.

@swinton
Created November 28, 2020 17:48
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 swinton/c6c8ef9a53be1e7efc4746a6a0cb6693 to your computer and use it in GitHub Desktop.
Save swinton/c6c8ef9a53be1e7efc4746a6a0cb6693 to your computer and use it in GitHub Desktop.
How to Enable Pasting Text on Sites That Block It

Re-enable copy and paste

var allowEvent = function(e) {
  e.stopImmediatePropagation();
  return true;
};
document.addEventListener('paste', allowEvent, true);
document.addEventListener('copy', allowEvent, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment