Created
November 14, 2023 13:07
-
-
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!
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
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