deactivate CSS “user-select” globally

Viewed 777

I’ve just come across a site using a CSS property -moz-user-select, set to none, as an anti-user measure:

#content {
 -moz-user-select:none;
 -webkit-user-select:none;
 -ms-user-select:none;
 user-select:none
}

How can user-select be disabled completely in Firefox? I’m looking for a permanent, unconditional and non-overridable solution like a compile flag or a configuration setting that is guaranteed to be effective. The expected behavior is that the browser treat all text as selectable again, as if the property didn’t exist in the first place.

2 Answers

Try using this extension, which explicitly states a feature of "Add Custom JavaScript Codes or Styles (CSS) to an specific page or all pages."

If you add the following CSS to all pages, it should undo the effects, unless the dev (for some reason) used !important on one of their declarations.

* {
  -webkit-user-select: unset;
  -moz-user-select: unset;
  -ms-user-select: unset;
  user-select: unset;
}

You could naturally put in a better selector if any specific site is giving you trouble - just increase the specificity.

Full disclosure: I have never used the extension I linked, so I can't vouch for it. I'm just going off what it claims to do.

You can achieve this by adding a custom style in the browser. I use Stylus addon. It's a fork of chrome extension Stylish.

  1. Install the addon
  2. Click Manage
  3. Write a new style
  4. Add these lines in the code section
* {
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

enter image description here

You don't have to add !important rule. The extension forces to apply the custom style by default.

Related