Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    This will apply to every page if left enabled, which might not be desirable in all situations. Could you not just nest the function in an if statement that executes the script only if the URL matches a particular site or array of sites? Commented Jan 9, 2018 at 3:33
  • 1
    @Hashim That isn't necessary; you can specify which pages it applies to with one or more @match statements, but that would require modifying the script when you wanted it to apply to a specific page, unless you only visit a specific site or set of sites that you always want to modify. For the example script I made it generic by using *://*/* as the URL to match, so it will apply everywhere. It can be toggled on and off from the menu of the user script manager.
    – Herohtar
    Commented Jan 9, 2018 at 3:55
  • In my case, the css rule that worked was body * :not(input):not(textarea) { user-select: auto !important; -webkit-user-select: auto !important; }
    – Keyslinger
    Commented Jan 27, 2022 at 4:35
  • This site brought me here hildastouchofspice.com/2011/12/marzipan.html#prettyPhoto . The above answer plus superuser.com/a/964711/617826 does the trick.
    – DannyBoi
    Commented Dec 17, 2022 at 4:02