Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Fork the Don't Fuck with paste code and add that feature (or use it as an example to make your "Don't fuck with copy" extension).

https://github.com/jswanner/DontFuckWithPaste

I hate sites that do that (or prevent right-click as if that somehow secures their code).



I'd actually like an extension along the lines of "This is not Google Docs, for fuck's sake", that just disables all these APIs that are only ever useful with rich apps, but not with content-heavy websites, for example:

- copy/paste hijacking

- sensor access: microphone, camera, GPS, etc.

Maybe even go further and introduce some sort of rate-limiting for

- XHR requests

- relayout events

to save power and data.


Incidentally, what are these APIs? I am building a rich content app (SVG editor) and have been starting to think about what copy + paste will look like.


I think you want to investigate the "ClipboardEvent" web API. Try starting here: https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEv...


Thanks!


Couldn't you just load a JS file before 3rd party scripts and overload those methods? Preferably in a way that won't break the site.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: