1

This website: https://www.kingstonist.com/

Blocks you from selecting text, right clicking, and even a bunch of common keyboard shortcuts.

I like to highlight blocks of text as I read because it's easier to find my place when interrupted etc. It's really annoying on websites like this to be 'blocked' from doing so.

Simply blocking JS doesn't work (though the annoying message disappears).

Using the dev console I've narrowed the offending feature to this "style" block in the body section:

<style>
                *:not(input):not(textarea)::selection {
            background-color: transparent !important;
            color: inherit !important;
        }

        *:not(input):not(textarea)::-moz-selection {
            background-color: transparent !important;
            color: inherit !important;
        }
</style>

Removing this makes it so I can select text as one would normally. I'm just not experienced enough with CSS & JS to be able to figure out what code I need to plug into ViolentMonkey (or similar runtime editor) to make this disappear. It's the same block of code on every page, and removing it works to restore highlight functionality. I just want an automatic script to do this, so I don't need to click into the dev tools every time!

I've tried a bunch of suggestions from the below link which is a similar issue, but unfortunately nothing has worked for me so far. How do websites block selecting text and how do I unblock that?

2
  • It stops the pop-up. Which is the same behaviour I get when I disable JS on the page. But the text is still apparently "hiding" behind a transparent layer of some kind. It drags the whole text as if its a picture or something. Screenshot: ibb.co/c3s2mq3
    – Luke
    Commented Jun 8 at 18:24
  • If you can use a screenshot, you can use optical character recognition to change the image to text. Commented Jun 9 at 3:08

1 Answer 1

0

You can to use Edge's Immersive Reader (F9 shortcut). I do not know how it is called in Chrome (and if available). Other option would be to install browser extension, but this is last option and if really needed. I am not familiar with violentMonkey, but if you apply

background-color: initial !important;

then it might overwrite the previous !important style and revert it to the initial. Probably copy paste your CSS example with just replacing "transparent" with "initial".

1
  • On Android I found that 'reading mode' gives a text select function and a customizable reading experience. Seems to work very well on my phone. Going to have to try the same on the desktop. Thanks for the suggestion!
    – Luke
    Commented Jun 15 at 15:24

Not the answer you're looking for? Browse other questions tagged .