Night Mode Addon compatible with 27+?

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4279
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: Night Mode Addon compatible with 27+?

Unread post by Pallid Planetoid » 2018-06-23, 17:55

Hi JustOff --

Suggestion: What do you think of providing users with an option to turn on/off "Nite Mode" during a specific set time-range?

What I would perhaps be doing myself is have "Nite Mode" off from say 600 to 1800 hours (day-time) and the remaining 24 hours 1800 to 600 hours the next day (night-time) have "Nite Mode" on. ;)

Even better yet also include a "daylight savings time adjustment" option so the time-ranges adjust an hour either way back-and-forth accordingly to accommodate the two time adjustments that occur during the year. :thumbup:

Of course this last suggestion would have to be optional (possibly adjustable as well in the event the dates change however as of now all States that practice this are identical as illustrated in the screen-shot) since this is applicable only to the U.S. and not all States apply as well (i.e. Arizona and Hawaii):
DST state-wide.png
This extension has gotten very powerful with additional handy options -- adding this would provide even more usable/practical options... :D
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

User avatar
Nigaikaze
Board Warrior
Board Warrior
Posts: 1322
Joined: 2014-02-02, 22:15
Location: Chicagoland

Re: Night Mode Addon compatible with 27+?

Unread post by Nigaikaze » 2018-06-23, 18:09

Pale Moon Rising wrote:Even better yet also include a "daylight savings time adjustment" option
If it would be getting the time from the OS, that shouldn't be necessary. Your OS should adjust the time accordingly for daylight savings time changes.
Nichi nichi kore ko jitsu = Every day is a good day.

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

Re: Night Mode Addon compatible with 27+?

Unread post by tooshorttoolong » 2018-06-23, 18:19

Daylight saving time is unfortunately not a USA-only thing. Anyway I don’t think it would be a useful option as we usually use computers indoors with artificial lighting.

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4279
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: Night Mode Addon compatible with 27+?

Unread post by Pallid Planetoid » 2018-06-23, 18:32

tooshorttoolong wrote:Daylight saving time is unfortunately not a USA-only thing. Anyway I don’t think it would be a useful option as we usually use computers indoors with artificial lighting.
Hmm, based on your conclusion there would then be no need for the actual extension ("Nite Mode") itself.... :? (Note: for purposes of clarity -- I bolded the part myself in the post that is relevant to my reply)

In other words you're making the argument that the extension is superfluous... ;)

Edit: thanks to tooshorttoolong pointer -- I've corrected my improper use of the word "your" which should have been the contraction "you're" (a bad habit of mine).
Last edited by Pallid Planetoid on 2018-06-23, 19:24, edited 1 time in total.
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4279
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: Night Mode Addon compatible with 27+?

Unread post by Pallid Planetoid » 2018-06-23, 18:35

Nigaikaze wrote:
Pale Moon Rising wrote:Even better yet also include a "daylight savings time adjustment" option
If it would be getting the time from the OS, that shouldn't be necessary. Your OS should adjust the time accordingly for daylight savings time changes.
Excellent point! :thumbup: (I had to think about that for a moment ;))

Addendum: but then I was thinking in terms the longer days -- but then that changes as time progresses in and out of the two time settings so nothing is going to be perfect -- and with that in mind your point remains a good one. :thumbup:
Last edited by Pallid Planetoid on 2018-06-23, 18:41, edited 1 time in total.
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

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

Re: Night Mode Addon compatible with 27+?

Unread post by tooshorttoolong » 2018-06-23, 19:05

Pale Moon Rising wrote:In other words your making the argument that the extension is superfluous... ;)
You have a very flawed logic. (And also, it’s written "you’re", not "your".)

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4279
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: Night Mode Addon compatible with 27+?

Unread post by Pallid Planetoid » 2018-06-23, 19:21

Off-topic:
tooshorttoolong wrote:
Pale Moon Rising wrote:In other words your making the argument that the extension is superfluous... ;)
You have a very flawed logic. (And also, it’s written "you’re", not "your".)
Thanks for the tip --- I fixed the post accordingly and I appreciate you pointing it out :thumbup: (is "you" alright there? -- I also often have the habit of leaving off the "r" in "your" even if I use the word correctly)
That said, I would like to know where my logic is flawed as well... I'm certainly capable of being wrong as already proven -- so I welcome the help regarding my alleged improper logic. ;)
Last edited by Pallid Planetoid on 2018-06-23, 19:27, edited 1 time in total.
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: Night Mode Addon compatible with 27+?

Unread post by adesh » 2018-06-24, 08:57

Pale Moon Rising,
You are assuming (kind of) that people want to use Night Mode addon for a specifc period in a day and then switch it off for the rest of the day. I don't think that's how most people use it. People use it because they like dark theme on web pages (and their OS, editor etc.) and it does not have anything to do with the time of the day. I guess this is the reason for your argument with tooshorttoolong.

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

Re: Night Mode Addon compatible with 27+?

Unread post by tooshorttoolong » 2018-06-24, 10:45

I mean that the current time, or even position of the sun (like Redshift and F.lux use), is not really a good way to automate enabling a dark theme, because what matters is the ambient light, which will be different depending if it’s cloudy or not, if you’re inside or outside, if the curtains are pulled, if there is artificial light. Other factors could be if your eyes hurt and which web page you’re looking at. Ideally we’d need a light sensor that measures the light coming from behind the monitor.

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4279
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: Night Mode Addon compatible with 27+?

Unread post by Pallid Planetoid » 2018-06-24, 10:50

adesh wrote:Pale Moon Rising,
You are assuming (kind of) that people want to use Night Mode addon for a specifc period in a day and then switch it off for the rest of the day. I don't think that's how most people use it. People use it because they like dark theme on web pages (and their OS, editor etc.) and it does not have anything to do with the time of the day. I guess this is the reason for your argument with tooshorttoolong.
Yes you're absolutely correct regarding my assumption (in some cases that is my conclusion -- which is why it would be an "optional" function) and certainly your alternative perspective is appreciated as well. That said, I would point out that the extensions name is after all "Nite Mode" which suggests that my assumption is arguably applicable. ;) And as an "optional" function users are welcome to use the function or not as they see fit -- wouldn't you agree?. As I see it if a user wants to use the extension as a "Nite Mode" function which again is after all the name of the extension and as such an additional "optional" automatic "Nite Mode" optional function for the add-on seems to me to be a reasonable suggestion. :think: (if you think about it a "Theme" is generally considered how a browser GUI is rendered and does not generally have to do with how websites get rendered (or am I wrong here?) -- this add-on involves changing the way web sites are rendered that is specifically in a more subdued way (reducing the frequent stark-white page rendering that is typical) and as such provides the user with a "Nite Mode" website alternative as I see it. (I may be misconstruing this -- and if so my apologies to all).
Last edited by Pallid Planetoid on 2018-06-24, 11:15, edited 2 times in total.
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4279
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: Night Mode Addon compatible with 27+?

Unread post by Pallid Planetoid » 2018-06-24, 10:57

tooshorttoolong wrote:I mean that the current time, or even position of the sun (like Redshift and F.lux use), is not really a good way to automate enabling a dark theme, because what matters is the ambient light, which will be different depending if it’s cloudy or not, if you’re inside or outside, if the curtains are pulled, if there is artificial light. Other factors could be if your eyes hurt and which web page you’re looking at. Ideally we’d need a light sensor that measures the light coming from behind the monitor.
Good points! -- that said, I'm using my computer right now (just as you are) and right now it is 3:52AM in my case and dark out including the room I'm in right now. Without "Nite Mode" enabled this page happens to be jarringly bright white on the other hand with "Nite Mode" enabled the age is far more subdued in this dark room and hence far easier on the eyes. Try it yourself in a dark room and you'll perhaps see what I mean (I typically leave the lights off when up using the computer as I find no need to have bright lights on -- I have a few very subdued night lights that produce very minimal light). So for people with my habits -- would you concede that perhaps a automatic "Nite Time" mode that coincides to day/night periods of a 24 hour day could be a welcome additional "optional' function? :think: (and of course my suggestion is relative to the time-of-day and not relative to "Redshift and F.lux" -- whatever that is.... I think we are over-thinking the complexity of what my suggestion represents. It's a far more simple consideration that simply involves the difference between night and day ;).... but thanks for the feedback. :thumbup:
Last edited by Pallid Planetoid on 2018-06-24, 11:04, edited 2 times in total.
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

JustOff

Re: Night Mode Addon compatible with 27+?

Unread post by JustOff » 2018-06-24, 12:45

Pale Moon Rising wrote:What do you think of providing users with an option to turn on/off "Nite Mode" during a specific set time-range?
Sorry, but this feature does not seem to me essential.

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4279
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: Night Mode Addon compatible with 27+?

Unread post by Pallid Planetoid » 2018-06-24, 17:40

^ Thanks for considering it though... :)
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Night Mode Addon compatible with 27+?

Unread post by Walter Dnes » 2018-07-17, 04:42

On my homebrew 32-bit PM28 builds ANM is on-again, off-again, every couple of "git clone" + builds that I do. With PM28 beta3 it's on again, for which my eyes are very greatful. Thank you for this wonderful extension.
There's a right way
There's a wrong way
And then there's my way

Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Night Mode Addon compatible with 27+?

Unread post by Walter Dnes » 2018-07-30, 23:36

Walter Dnes wrote:On my homebrew 32-bit PM28 builds ANM is on-again, off-again, every couple of "git clone" + builds that I do.
This is getting "curiouser and curiouser". It seems that ANM works fine on my bog-standard PM 28 builds. However, it does not work on my customized builds (different mozconfig). Same build machine+environment, same source code. Now that I've finally gotten builds working on CentOS 6.10, I can concentrate on this problem. I'll go with the heavy handed approach... changing 1 line at a time in my mozconfig until it stops working. The poor laptop will have to do several consecutive builds.
There's a right way
There's a wrong way
And then there's my way

Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Night Mode Addon compatible with 27+?

Unread post by Walter Dnes » 2018-07-31, 06:53

That took less time than I thought. Testing shows that adding ac_add_options --disable-devtools to the mozconfig disables ANM. @JustOff, can you confirm that ANM has a dependancy on something in devtools?
There's a right way
There's a wrong way
And then there's my way

JustOff

Re: Night Mode Addon compatible with 27+?

Unread post by JustOff » 2018-07-31, 12:30

ANM does not have a hard dependency on devtools and works just fine if they are not available. Moreover, ANM has not yet been updated to use the new path to gDevTools.jsm required for UXP, so it acts the same way as if they are not included, even if they are.

Do you see any errors in the console when ANM is failed to load in your build?

Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Night Mode Addon compatible with 27+?

Unread post by Walter Dnes » 2018-07-31, 13:05

JustOff wrote:Moreover, ANM has not yet been updated to use the new path to gDevTools.jsm required for UXP, so it acts the same way as if they are not included, even if they are.
I respectfully disagree. ANM works on my homebrew 32-bit builds with devtools enabled, and does not work with them disabled.
JustOff wrote:Do you see any errors in the console when ANM is failed to load in your build?
I see multiple repetitions of...

Code: Select all

console.error: 
Object
    - message = Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXPCComponents_Utils.import]
    - fileName = undefined
    - lineNumber = 18
    - stack = @undefined:18:NaN|@resource://gre/modules/commonjs/sdk/loader/sandbox.js:18:22|@resource://gre/modules/commonjs/sdk/content/sandbox.js:19:37|@resource://gre/modules/commonjs/sdk/content/worker-child.js:14:27|@resource://gre/modules/commonjs/sdk/content/page-mod.js:14:25|@resource://gre/modules/commonjs/sdk/remote/child.js:81:3|emitOnObject@resource://gre/modules/commonjs/sdk/event/core.js:112:9|emit@resource://gre/modules/commonjs/sdk/event/core.js:89:38|messageReceived@resource://gre/modules/commonjs/sdk/remote/child.js:67:37|
    - toString = () => toString
...in the --disable-devtools build (ANM doesn't work), but not in in the devtools-enabled build (ANM works).
There's a right way
There's a wrong way
And then there's my way

JustOff

Re: Night Mode Addon compatible with 27+?

Unread post by JustOff » 2018-07-31, 13:42

This error means that you not only disabled the devtools client (--disable-devtools), but also disabled the devtools server (--disable-devtools-server) that is required for Add-ons SDK, and I guess you patched the configure script, which should not allow you to do this. Thus, no Add-ons SDK based add-ons will work, including ANM, regardless of whether it uses devtools or not.
Last edited by JustOff on 2018-07-31, 13:58, edited 3 times in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35477
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Night Mode Addon compatible with 27+?

Unread post by Moonchild » 2018-07-31, 13:57

And this, my friends, is why we ask to see your build configuration.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked