2

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?

Robotnik
  • 2,645
Luke
  • 29

1 Answers1

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".

Gergo
  • 11