Skip to content

Instantly share code, notes, and snippets.

@solrevdev
Created November 14, 2023 13:07
Show Gist options
  • Save solrevdev/91d413e727ae75248acb1888b07f5362 to your computer and use it in GitHub Desktop.
Save solrevdev/91d413e727ae75248acb1888b07f5362 to your computer and use it in GitHub Desktop.
When sites try to block you from pasting data into fields. Stop them. allow paste!
var allowPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('paste', allowPaste, true);
// see
// https://www.cyberciti.biz/linux-news/google-chrome-extension-to-removes-password-paste-blocking-on-website/
// also see
// https://github.com/jswanner/DontF-WithPaste
// also you could add a bookmarklet
// javascript:forceBrowserDefault=(e=>{e.stopImmediatePropagation();return true;});['copy','cut','paste'].forEach(e=>document.addEventListener(e,forceBrowserDefault,true));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment