javascript:(function(){
allowCopyAndPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
})();
-
Star
(150)
You must be signed in to star a gist -
Fork
(22)
You must be signed in to fork a gist
-
-
Save Gustavo-Kuze/32959786ce55b2c3751629e40c75c935 to your computer and use it in GitHub Desktop.
Thanks.
Thanks
thanks
thanks
Thanks. it's worked.
Thanks
Thanks
Thanks, any chance you can fix the thing that breaks reader mode with the W. W. Norton books too?
This does not seem to work for Mcgraw Hill books, I modified it for anybody struggling with copy pasting from there. Here's a modified version.
javascript:(function(){
allowCopyAndPaste = (e) => {
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
document.addEventListener('mousedown', allowCopyAndPaste, true);
document.addEventListener('mouseup', allowCopyAndPaste, true);
document.addEventListener('selectstart', allowCopyAndPaste, true);
document.addEventListener('selectionchange', allowCopyAndPaste, true);
})();
You probably will have to refresh your page after copying as this can potentially break certain buttons and links.
I finally got a chance to test this with one of the W.W. Norton books, it doesn't seem to work.n When you highlight something it has a popup dialog that tries to hijack your clipboard.
Does not work in some bank websites
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.
Thanks