javascript:(function(){
allowCopyAndPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
})();
Last active
December 13, 2025 21:42
-
Star
(163)
You must be signed in to star a gist -
Fork
(27)
You must be signed in to fork a gist
-
-
Save Gustavo-Kuze/32959786ce55b2c3751629e40c75c935 to your computer and use it in GitHub Desktop.
Enable copy and paste in a webpage from the browser console
Thanks.
Awesome! Thank you!
Thanks.
Thanks.
Thanks
Thanks
Thanks
Thanks
How do I add this code to a website. (I am no professional coder. I just want to copy and paste from Mcgraw Hill.
Test this:
javascript:(function () {
const unblock = (e) => e.stopImmediatePropagation();
["copy", "cut", "paste"].forEach(evt =>
document.addEventListener(evt, unblock, true)
);
})();
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does not work in some bank websites