Night Mode Addon compatible with 27+?

General discussion, compatibility and contributed extensions.

Moderators: FranklinDM, Lootyhoof

Firefairy
Hobby Astronomer
Hobby Astronomer
Posts: 23
Joined: 2017-01-03, 12:32

Night Mode Addon compatible with 27+?

Post by Firefairy » 2017-02-13, 14:25

I am looking for an addon that will, when turned on, darken or invert every page loaded in the browser, preferably with a blacklist so I can turn it off on pages it doesn't play nicely with. All I have been able to find is Aniverto (https://addons.mozilla.org/en-us/firefox/addon/aniverto/), which performs the basic function I want, but has to be turned on every time one loads a page, which makes it nearly useless with my usual browsing behavior. That weakness has been removed by the dev in their newer addon, but that doesn't work in PM.

For reference, I already know about the following, and they don't suit my needs:
Dimming userscripts that only lower the brightness of pages. These also reduce contrast- I very much prefer light text on black or very dark background to black on gray/dim.
Userscripts that try to enforce nightmode on every page. Best solution I have found yet, I am currently using this one: https://userstyles.org/styles/136322/global-white-black-night-mode, the main downside is the lack of easy blacklist or disable-for-this-tab. Blacklist is doable, just not convenient, disable-by-tab isn't really a thing as far as I can tell.
F.lux and similar color-shifting programs to adjust screen color/brightness by time of day. I already use f.lux, I want an addon in addition, not in place of universal color shift.

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1960
Joined: 2015-09-03, 19:47
Location: UA
Contact:

Re: Night Mode Addon compatible with 27+?

Post by JustOff » 2017-02-13, 20:08

It seems it's rather simple to create an extension which will load css selectively per domain (as it done in HTML5 Video Tuner) to implement similar "night mode". Does anyone else interested in such add-on?
Here are the add-ons I made in a spare time. That was fun!

fillerup
Astronaut
Astronaut
Posts: 508
Joined: 2014-05-19, 19:14
Location: Finland

Re: Night Mode Addon compatible with 27+?

Post by fillerup » 2017-02-14, 03:22

JustOff wrote:It seems it's rather simple to create an extension which will load css selectively per domain (as it done in HTML5 Video Tuner) to implement similar "night mode". Does anyone else interested in such add-on?
i'd totally use it if it can generate a particular color palette (say, dark green or dark blue depending on my needs), though i understand that's much more complicated than say, a simple color inverter

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1960
Joined: 2015-09-03, 19:47
Location: UA
Contact:

Re: Night Mode Addon compatible with 27+?

Post by JustOff » 2017-02-14, 21:20

I have forked Dark Background and Light Text as Advanced Night Mode, hope the lovers of darkness will find it useful 8-)
Here are the add-ons I made in a spare time. That was fun!

User avatar
gracious1
Keeps coming back
Keeps coming back
Posts: 882
Joined: 2016-05-15, 05:00
Location: humid upstate NY

Re: Night Mode Addon compatible with 27+?

Post by gracious1 » 2017-02-23, 19:08

Just the other night I was looking for a a night-mode addon, and all of the ones I could a find used jetpack. Glad I saw this thread. Thank you very much, Justoff! :thumbup:
20 July 1969 🌗 50th Anniversary of Apollo 11 🌓 "One small step for [a] man, one giant leap for mankind." 🚀

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1960
Joined: 2015-09-03, 19:47
Location: UA
Contact:

Re: Night Mode Addon compatible with 27+?

Post by JustOff » 2017-04-30, 20:39

Advanced Night Mode has been updated to 1.0.3:

[+] Add special style to Invert method for Moon PDF Viewer
[±] Use Invert method as default for *.pdf
Here are the add-ons I made in a spare time. That was fun!

User avatar
mr tribute
Fanatic
Fanatic
Posts: 170
Joined: 2016-03-19, 23:24

Re: Night Mode Addon compatible with 27+?

Post by mr tribute » 2017-05-01, 13:27

Looks cool and works well. Thanks JustOff :thumbup:

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1960
Joined: 2015-09-03, 19:47
Location: UA
Contact:

Re: Night Mode Addon compatible with 27+?

Post by JustOff » 2017-05-05, 12:25

Advanced Night Mode has been updated to 1.0.4:

[±] Make PDF viewer interface color customizable
[±] Revert devtools theme back to 'light' when dark mode disabled
Here are the add-ons I made in a spare time. That was fun!

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1960
Joined: 2015-09-03, 19:47
Location: UA
Contact:

Re: Night Mode Addon compatible with 27+?

Post by JustOff » 2017-05-09, 20:46

Advanced Night Mode has been updated to 1.0.5:

[+] Allow to switch on/off dark DevTools theme
[±] Properly handle non-standard (like about:something) URLs with parameters
Here are the add-ons I made in a spare time. That was fun!

vertigo220
Apollo supporter
Apollo supporter
Posts: 31
Joined: 2013-11-16, 20:08
Location: US

Re: Night Mode Addon compatible with 27+?

Post by vertigo220 » 2017-07-26, 18:08

Been using this for a few days now and it works well for the most part, but every now and then it'll load a page in a domain I've disabled it on in night mode. Also, I've run across a few different pages where none of the night modes work well. For example, on Reddit, the voting arrows are often invisible in night mode, and some (some subreddits use different images for the voting buttons) can be fixed with the different night mode settings and some can't, which seems strange since you'd think invert at least would always work.

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1960
Joined: 2015-09-03, 19:47
Location: UA
Contact:

Re: Night Mode Addon compatible with 27+?

Post by JustOff » 2017-07-26, 18:32

vertigo220 wrote:every now and then it'll load a page in a domain I've disabled it on in night mode.
Could you please provide the steps to reproduce?
seems strange since you'd think invert at least would always work.
CSS is quite a tricky thing ...
Here are the add-ons I made in a spare time. That was fun!

vertigo220
Apollo supporter
Apollo supporter
Posts: 31
Joined: 2013-11-16, 20:08
Location: US

Re: Night Mode Addon compatible with 27+?

Post by vertigo220 » 2017-07-26, 22:29

JustOff wrote:Could you please provide the steps to reproduce?
Go to a site with the addon enabled, when it loads in the default night mode, click the addon button and set it to disabled for that site. Continue browsing the site and every now and then it will load in night mode. For example, I just did a google search via the context menu, and it loaded the search page in night mode. I checked the addon, and sure enough, it was set to disabled for google. Also, another search I did just a little while ago that's still open is normal, not in night mode. Another site this happens a lot on is barter.vg, though I don't think it's anything with the site but rather I notice it more when I'm on a site that I'm browsing a lot and loading a lot of tabs in.

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1960
Joined: 2015-09-03, 19:47
Location: UA
Contact:

Re: Night Mode Addon compatible with 27+?

Post by JustOff » 2017-07-27, 11:37

vertigo220 wrote:Go to a site with the addon enabled, when it loads in the default night mode, click the addon button and set it to disabled for that site. Continue browsing the site and every now and then it will load in night mode.
I can't reproduce this issue. If I change night mode for some site, it is always displayed using the selected mode. Could anyone else confirm the bug observed by vertigo220 and provide an exact way to reproduce it?
Here are the add-ons I made in a spare time. That was fun!

vertigo220
Apollo supporter
Apollo supporter
Posts: 31
Joined: 2013-11-16, 20:08
Location: US

Re: Night Mode Addon compatible with 27+?

Post by vertigo220 » 2017-07-27, 15:51

The only thing I can suggest is try changing it to night mode, using that to browse a site for a day or two, then change it to disabled for that site. Perhaps you need to cycle through the various options on a site for it to happen (i.e. 'Default' > 'Invert' > 'Simple CSS' > 'Stylesheet processor' > 'Default' > 'Disabled'), since I did that for some sites trying to find one that displayed everything properly. Though I don't think I did it with google, so maybe not. Last night I also had a page that was rendered normally (disabled for that page), but a small part of it (captcha box I think) was rendered in night mode. I'm guessing since captchas are served by google and it messed up and thought it was supposed to display google sites in night mode again.

tooshorttoolong
Fanatic
Fanatic
Posts: 132
Joined: 2017-09-11, 14:28

Re: Night Mode Addon compatible with 27+?

Post by tooshorttoolong » 2017-10-16, 11:51

Since this seems to be the official bug report thread for Advanced Night Mode…

First thanks JustOff, this is an awesome addon! (Even if you "just" forked it originally. Thanks to Mikhail Khvoinitsky, the original author, too :))

Now my issue: ANM forces "Use system colors". If I un-tick this setting, ANM puts it back on when I disable the night mode. This is a problem for pages that fail to set either text or background colors and just assume text is black and bg is white (because my system colors are: bright text, dark bg).

Another issue is that on some web pages, when night mode is enabled, the pages first flash in white before ANM changes the style. For example these two pages:
https://schnouki.net/posts/2014/12/12/o ... -on-linux/
https://bb.arethusa.su/

I am using ANM 1.0.5 with PM 27.5.1 on Linux.

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1960
Joined: 2015-09-03, 19:47
Location: UA
Contact:

Re: Night Mode Addon compatible with 27+?

Post by JustOff » 2017-10-16, 13:27

tooshorttoolong wrote:Now my issue: ANM forces "Use system colors". If I un-tick this setting, ANM puts it back on when I disable the night mode. This is a problem for pages that fail to set either text or background colors and just assume text is black and bg is white (because my system colors are: bright text, dark bg).
Sorry, but I can't figure out what you mean. Could you provide a simpler description with screenshots?
Another issue is that on some web pages, when night mode is enabled, the pages first flash in white before ANM changes the style. For example these two pages:
https://schnouki.net/posts/2014/12/12/o ... -on-linux/
https://bb.arethusa.su/
I'll look at this.
Here are the add-ons I made in a spare time. That was fun!

tooshorttoolong
Fanatic
Fanatic
Posts: 132
Joined: 2017-09-11, 14:28

Re: Night Mode Addon compatible with 27+?

Post by tooshorttoolong » 2017-10-16, 14:08

JustOff wrote: Sorry, but I can't figure out what you mean. Could you provide a simpler description with screenshots?
Open the preferences, Content, Colors. There is a "Use system colors" checkbox:
colors.png
When I enable the night mode, the setting is automatically changed:
colors-night-mode.png
And when I disable the night mode, it goes back to:
colors-after-night-mode.png
This is no matter what the original setting was. ANM will always enable "Use system colors" when I go out of the night mode. I would like it to keep the previous setting instead :).

tooshorttoolong
Fanatic
Fanatic
Posts: 132
Joined: 2017-09-11, 14:28

Re: Night Mode Addon compatible with 27+?

Post by tooshorttoolong » 2017-10-16, 14:12

JustOff wrote:
Another issue is that on some web pages, when night mode is enabled, the pages first flash in white before ANM changes the style. For example these two pages:
https://schnouki.net/posts/2014/12/12/o ... -on-linux/
https://bb.arethusa.su/
I'll look at this.
Thanks. BTW I’m not sure if I was clear, I mean that the pages seem to use their normal CSS theme for a short moment if:
- I enable night mode.
- then I load or reload the page.

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1960
Joined: 2015-09-03, 19:47
Location: UA
Contact:

Re: Night Mode Addon compatible with 27+?

Post by JustOff » 2017-10-16, 14:24

tooshorttoolong wrote:ANM will always enable "Use system colors" when I go out of the night mode.
As far as I see it always disables it :coffee:
I would like it to keep the previous setting instead
Well, i.e. you want ANM preserves last state of "Use system colors" when it disables its night mode, right? This can be a problem, because it is not clear what state to consider the original. We can only try to add an option like "Enable system colors when go out of night mode".
Here are the add-ons I made in a spare time. That was fun!

tooshorttoolong
Fanatic
Fanatic
Posts: 132
Joined: 2017-09-11, 14:28

Re: Night Mode Addon compatible with 27+?

Post by tooshorttoolong » 2017-10-16, 15:05

JustOff wrote: Well, i.e. you want ANM preserves last state of "Use system colors" when it disables its night mode, right?
Yes.
JustOff wrote:This can be a problem, because it is not clear what state to consider the original. We can only try to add an option like "Enable system colors when go out of night mode".
Is it not possible to store the original state when the user asks to switch to the night mode?
But a setting would work too.

Post Reply