TransWikia.com

Removing annoying click-handling logic from websites

Super User Asked on November 4, 2021

There are a lot of websites out there that block your ability to right click or select text. I believe it’s done as a sort of half-assed security measure to prevent people from copying text or images. Of course, it’s always possible to circumvent that by using DevTools, it’s just more time-consuming and annoying.

Here are a couple of examples, sorry for the Hebrew:

  1. On this store, I wanted to select and copy the product name (Behringer MicroMix MX400), but there’s "protection" against marking text, right-clicking and possibly copying.

  2. On my broker’s website I wanted to right-click the username field so I could do "inspect element" on it, but it won’t let me. I was still able to find the element manually in DevTools, but it took more time.

  3. Some websites do let you copy text, but they add their own custom text snippets to the text you copy, usually with a link to that site. Very annoying.

I assume that these "protections" are implemented by listening to events such as clicks and ctrl-C.

Is there a solution for disabling all these annoying "protections" from websites? (specifically in Chrome).

6 Answers

Such blocking is done via JavaScript. Adding extensions (any extension that can allow/block JS) is a nice and handy workaround. A lot of popular extensions were recommended. If, however, you just need this once in a while and you think you don't need and extension, this should be easy enough to achieve:

  • with Chrome: click on the lock-pad in the address bar, then site settings. Chrome will open a new tab with the settings for the site. Choose Block JavaScript. Refresh if necessary, done.
  • with Firefox, you'd better use an extension if you want to block JS selectively on certain sites, instead of blocking JS globally.

This can be done to overcome the blocking message that blur the whole page and telling you that you're using some form of Ad blocker, and requesting you to turn it off.

Answered by Jim Raynor on November 4, 2021

If you don't mind removing all event listeners from the current page:

  1. Open Chrome Dev Tools (Ctrl+Shift+I) and select Console
  2. Type the following to remove all event listeners: $("*").off();
  3. Alternatively, to remove all right-click listeners: $("*").off("contextmenu");

It's a good way to do that particular task without installing any 3rd party add-ons.

Answered by Alex on November 4, 2021

As part of uBlock Origin which many (over 10 million) people are using (including myself) and is the de-facto best ad-blocker available. You can simply disable javascript for the site, which allows you to select and copy-paste the text.

Just click this button: enter image description here

Answered by Idos on November 4, 2021

NoScript should help you with most websites which mess with context menus and other annoying things that mess with website experience. It auto-blocks all scripts which it considers unsafe. You can also manually experiment with it for specific sites. This should also prevent clipboard modification.

enter image description here

You can individually prevent specific scripts from running on each site with this extension. It works on next-pro pretty well.

ScriptSafe is another alternative with a different UI.

Answered by Razetime on November 4, 2021

I have found all these extensions for Chrome. One of them surely will work for you:

(Seems like this annoyance has motivated many developers.)

Answered by harrymc on November 4, 2021

I have been using the FF version of this extension and it works fine:

Absolute Enable Right Click & Copy

Answered by myururdurmaz on November 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP