min-dark-mode-userscript icon indicating copy to clipboard operation
min-dark-mode-userscript copied to clipboard

is it possible to not invert the color of images?

Open kurokirasama opened this issue 5 years ago • 7 comments

great tool btw!!

kurokirasama avatar Aug 06 '20 17:08 kurokirasama

Do you have an example URL? Actual <img> elements should remain non-inverted, but other elements with a background-image will be, which is harder to fix.

PalmerAL avatar Aug 07 '20 00:08 PalmerAL

habitica.com... maybe they have background images...

kurokirasama avatar Aug 07 '20 01:08 kurokirasama

Yup, that's a background image. If you use that site a lot, you can exclude specific elements by editing the last CSS rule:

  iframe, img, video, canvas, #intro-signup {
  filter: hue-rotate(180deg) invert(100%) !important;
  }

Or disable the script for that site using these options: https://github.com/minbrowser/min/wiki/userscripts

But I can't think of an easy way to fix this for all sites at the moment.

PalmerAL avatar Aug 07 '20 01:08 PalmerAL

thanks!! HOw do I discover what elemente to exclude? For instance, how do I exclude the

of the page?

kurokirasama avatar Aug 08 '20 00:08 kurokirasama

If you wanted to exclude specific elements, you'd need to use the "elements" panel of the devtools (developer > inspect page), and look for IDs or classnames of the elements once you find them.

Particularly if the website has a dark theme, it's probably easier to exclude the entire site using the instructions linked above.

PalmerAL avatar Aug 08 '20 03:08 PalmerAL

thanks!!! Sorry to bother you again, but what do I exactly add to the script to exclude, for instance the

... part of the page...

kurokirasama avatar Aug 09 '20 03:08 kurokirasama

The last rule in the script (on this line) makes elements be excluded, so once you have a CSS selector for the element, you would add it to that list (separated by a comma).

PalmerAL avatar Aug 10 '20 00:08 PalmerAL