Hacker News new | ask | show | jobs
by WithinReason 1195 days ago
Is it possible to block this behavior at the browser level? Other than an addon: https://addons.mozilla.org/en-US/firefox/addon/re-enable-rig...
2 comments

In Firefox you can set dom.event.contextmenu.enabled and dom.event.clipboardevents.enabled to false in about:config which will natively prevent most of this type of annoyance.
Does this also disable the handy "click to copy to clipboard" buttons that a lot of sites feature?
I set both of these to false, and I was able to copy a command from a README file on GitHub still (after reopening tab)
In Chrome(and the likes):

- open developer tools (CTRL-SHIFT-I, or F12)

- make sure you are on Elements tab

- click on '<body class=...' tag line

- then in the right hand panel switch to Event Listeners tab

- remove anything you like(contextmenu, cut, copy, paste in this case)

I'm sure there is a similar way in Firefox...