I’m using following codes to block paste to certain webpages
document.addEventListener('paste', (event) => {
event.preventDefault();
});
It works in most cases except for prompt box in https://chatgpt.com. here is what i did step by step:
- open https://chatgpt.com with chrome for windows
- open console and run above codes
- copy some texts and paste to prompt box with CTL+v or rightclick->paste
- texts are pasted successfully
I wonder how it pasts text and is there any way to block it.