-
-
Save liuliangsir/0bcdad9785ee25c19f4577aa8c99d466 to your computer and use it in GitHub Desktop.
Enable copy and paste in a webpage from the browser console
This file contains hidden or 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
| javascript:(function(){ | |
| allowCopyAndPaste = function(e){ | |
| e.stopImmediatePropagation(); | |
| return true; | |
| }; | |
| document.addEventListener('copy', allowCopyAndPaste, true); | |
| document.addEventListener('paste', allowCopyAndPaste, true); | |
| document.addEventListener('onpaste', allowCopyAndPaste, true); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment