The new copy-paste budget can be easily be bypassed using a simple JavaScript hack:
localStorage["copyBudget"] = "Infinity";
Now people can copy-paste all they want without The Key™! It should be patched.
The new copy-paste budget can be easily be bypassed using a simple JavaScript hack:
localStorage["copyBudget"] = "Infinity";
Now people can copy-paste all they want without The Key™! It should be patched.
Infinity
gets reset to 2. Also major props for being line aware as it seems: i.sstatic.net/xR1OB.gif :) P.s. An even more robust version:document.addEventListener("keyup", ({ ctrlKey, key }) => { if(ctrlKey && key.toLowerCase() === "c") { localStorage.copyBudget = "Infinity"; } });
addEventListener("copy", e=>e.stopImmediatePropagation(), true);
would be both more straightforward and more robust, e.g your code wouldn't work on macOs devices where we copy using themetaKey
, nor for users copying through other means than a keyboard.copy
event is even better, didn't think too much about the upgrade :)