Theme Font & Size Changer for Thunderbird (#E6) [update 64.3 #2]
[You’re late to the party. This crap has been fixed and is now available as addon directly from Mozilla. Click here for the addon announcement, or read the comments on this page for a secondary fix (64.4) for TB58+.]
You know what really grinds my gears? MORONS that “maintain” a piece of software.
This guy called Baris Derin has quite a lot of Mozilla (FF/TB) addons out there. Great stuff. I’ve been using the font changer for quite some time, as my Thunderbird looks a bit odd with default settings. So, what’s wrong with it?
This addon fails every so often.
No, it’s not Thunderbird updating and adding weird stuff or changing some of the API. I know when my apt says “there’s an update for thunderbird”. And today, there was none. Same yesterday. And the friggen addon failed ONCE AGAIN for no valid reason.
Well, the commentators on mozilla.org do know why, even if most of the helpful posts get deleted for some reason (I don’t think Mozilla deletes them just for fun, but that’s just my point of view…).
This IDIOT is using the following lines of code in bootstrap.js:
const build = 1515509396;
if((build+'').length != 10) Services.prompt.alert(null, 'CompileAddon', 'An error occured');
if(new Date().getTime() > ((build+'').length == 10 ? build*1000 : build)+(3*30*24*60*60*1000)) return false;
Yeah, THAT FRIGGEN GRINDS MY GEARS.
1515509396 is obviously an unix time stamp. Built/updated on Tuesday, 09-Jan-2018 14:49:56 UTC to be precise. Today is April 9th 2018. Guess what + 3*30*24*60*60 (*1000 for milliseconds) does – it adds three months (well, 90 days) of lifetime to the build date. If that number is smaller than the current timestamp from new Date().getTime() – bingo – it returns false. Addon silently fails. No warning message, no errors in the log, no nothing. The addon silently fails after three months if the author does not push a new version. And the last 3 times he did, his “new” version was the very same source code with a different const build value.
Sir, you are an idiot.
Go get a job at Oracle and GTFO of the open source world.
Here’s a “fixed” version of the current v64.1 (theme_font_size_changer_for_tb-64.1-sm+tb.xpi): theme_font_size_changer_for_tb-64.1-sm+tb_fixed.xpi.zip
(rename to .xpi instead of .xpi.zip, WordPress doesn’t allow .xpi uploads)
(extract once and the .xpi file is right there – no need to enable file extension display in your file manager)
Update: Here’s a fixed version for Thunderbird and also for older Firefox versions up to 56.x, because for 57+ (“Quantum”, wank, wank) they’ve changed UI crap and finally render XUL extensions like this unusable. I’ve re-added FF compatibility and zipped the file for your convenience – just unzip and add to TB/FF (see comments if you need help)
Also, it only took five days for Mozilla to “approve” this as a new addon. As the first revision was indeed buggy, I’ve just submitted the 64.3 version. Expect it to work around next week or so [edit: it took THIRTEEN DAYS] – once it is hosted at Mozilla, you can install it just like every other addon. This also fixes the issue if Baris Derin decides to push a new update – this fixed version will not update back to his tree.
This is the very same source code except the if(new Date().getTime() >… line is removed. One could also change the build date to something in the distant future, but don’t exceed 10 digits, as the first line checks that as well. It’ll throw an error, though…
If that does solve your problem with this otherwise fine addon – let me know and report the addon as not meeting the addon policy:
Should an add-on include any unexpected feature that falls into one of the following categories:
Potentially compromises user privacy or security (like sending data to third parties)
Changes default settings like the new tab page, homepage or search engine
Makes unexpected changes to the browser or web content
Includes features or functionality not related to the add-on’s core function(s)
Then the “unexpected” feature(s) must adhere to all of the following requirements:
The add-on description must clearly state what changes the add-on makes.
All changes must be “opt-in”, meaning the user has to take non-default action to enact the change. Changes that prompt users via the permissions system don’t require an additional opt-in.
The opt-in interface must clearly state the name of the add-on requesting the change.