Back to index
Last updated: 16 October 2017
Added an aside.

Introduction: What is a 'Legacy' Firefox addon and what does it mean for end users?

A little bit ago I went to load YouTube but when I went to allow scripts (because I have NoScript and have for many, many years) there was no way to actually enable scripts! That means NoScript wasn't even visible. I thought this extremely odd because it is extremely odd! And bloody annoying too! I first went to find the addons page in Firefox under Edit -> Preferences (since I have that enabled; another thing I hate about software for some years now is the ridiculous user-unfriendly idea of 'saving screen space' when that's what 'minimise' was invented for: but I've written about that before). But then I didn't see addons panel. Great! So I went to the new(er) and 'improved' interface (the icon with three horizontal lines that mousing over says 'Open menu') and then I saw addons; here I noticed that NoScript - and others - were labelled Legacy. Aha! So it must be related to that.

Until I dug a little bit into the problem I feared I might have to disable the addon or ultimately find a way to enable scripts globally: something I did not at all want to do. But thankfully I discover a hack to allow it; it wasn't hard to do this but I shouldn't have had to do this in the first place which leads me to a short deviation. If you want to skip that click here (I actually suggest skipping it!). But I feel the need to say this because as a developer - as well as a user (remember developers are also users!) - I find it totally inexcusable that developers act as if they're so superior to think they always know what the users want (and whether this is an example of that mentality is besides the point because this is a terrible idea of theirs).

A slight deviation: what the hell are you thinking Mozilla?

This is such an incredibly stupid decision on the part of any developer of any kind but particularly with a large user base as Firefox. It's also quite arrogant and once again ignoring the user needs. And without the users the software is useless! It is true without the developers the users are irrelevant but the reality is there needs to be a peaceful harmony between the two: and it seems to me that software developers more and more in the past few years are just too mighty to remember this. And it's a terrible fucking disgrace Mozilla. Programmers with this mentality taint the name of programmer.

Someone sympathising with Mozilla might have all sorts of excuses for them but if you look at their website you see things like:

More freedom

Following the pack isn't our style. As part of the non-profit Mozilla, Firefox leads the fight to protect your online rights and champion an Internet that benefits everyone — not just a few.

What a load of bilge. As a non-profit and supposedly open source project you sure aren't all that open when it comes to many things especially your user's needs!

More speed

Bring it, Internet! We've spent the last year supercharging Firefox’s performance. Now start up faster, tab hop quicker and scroll like a speed demon.

Funny that; over the years I've noticed it goes slower. And what's more is it takes far more CPU% than it used to too. Recently with the same number of tabs - and not nearly as many as I've had in the past - I've had to kill Firefox many times because of high CPU utilisation. That's not faster; that's inefficient and it shows itself with relatively high latency. Addons didn't change one bit between this either.

More privacy

Firefox doesn't sell access to your personal information like other companies. From privacy tools to tracking protection, you’re in charge of who sees what.

More privacy? And yet you decide to change the API for addons/extensions only allowing them to fully function after Firefox 57 is released stable? That's just pathetic when you consider NoScript. Privacy indeed. What a load of rubbish.

Workaround: Disable the 'Legacy' status of addons until they've been updated

Discovering that NoScript was legacy I hoped for an update. But before I checked for an update I opened about:config and searched for 'legacy'; I saw three variables:

The first was set to 'true'; the second was 'false'; the third (value) was what I recognised to be an unique identifier of some extensions that are (I presumed) whitelisted. I thought it odd though: if legacy scripts were enabled why weren't the addon interfaces available? This is when I went to noscript.net and went to the 'get it' link. They had some information on the matter:

Development version

If you're brave enough and you need a specific feature or fix not released yet, or you simply want to provide feedback before official release, you may want try this development build.

IMPORTANT: if you're using Firefox 57 you'll need to open about:config and turn the extensions.legacy.enabled preference to true, otherwise the browser will refuse to install Noscript. Furthermore, you need a "blueish" Firefox, either Firefox Developer Edition or Nightly. The preference trick doesn't work in "orange" Firefox (beta/release). NoScript is currently a Hybrid WebExtension, and therefore won't install on Firefox 57 pre-releases without this trick. Before Firefox 57 is released in the stable channel, a pure WebExtension NoScript will be available an you'll be automatically migrated to it.

Well that's just lovely. Expecting - and this is by no means the fault of any addon developer! - people to run developer i.e. unstable builds for addons to work is so incredibly stupid and arrogant that they should be beyond ashamed. Whatever. I wondered about something though. Was I running Firefox 57? I didn't remember running `yum update' yesterday and it worked fine yesterday. So I checked (note that I've removed the author email out of courtesy and respect for privacy):

$ rpm -q --changelog firefox|head -n 5
* Wed Oct 04 2017 Martin Stransky - 56.0-4
- Fixed rhbz#1497932 - Plug-Ins for example flash fails
because of unresolved symbols
[...]

Right. I checked yum.log and I saw I hadn't updated it in some days. Well that was discouraging. But I didn't give up. I focused on the config key: extensions.legacy.exceptions. As I said it looked like an unique ID in the form of {73a6fe31-595d-460b-a920-fcc0f8843232} (it wasn't that; I added that to the list because that is NoScript on my system). This meant I had to find the UID of NoScript. My shell is my best ally.

I don't know if NoScript is the same UID - somehow I suspect it's not - in all systems so you'll need to find it in order to add to the variable I mentioned above. The following will show how I found it but I'll comment in between where I feel relevant.

$ cd ~/.mozilla/firefox

If you look at the directory contents (`ls') you should see a file 'profiles.ini'. You need to either open it or use grep (with context) to find out which profile is your default (or whichever one you use). If you only have one subdirectory you probably don't have to worry about it and you can `cd' into it. It'll look something like this:

[Profile0]
Name=default
IsRelative=1
Path=xyzzy.default
Default=1

Whatever path is you'll need momentarily. If 'IsRelative' is set to 1 (as it is in my example) then it's a relative path; else you'll have to specify the absolute path (which I've never seen but it's possible). Under that directory there should be another directory called 'extensions'. So in my example you'd do:

$ cd xyzzy.default/extensions

If you do `ls' you'll see at least one file if you have an addon or extension installed; this includes *.xpi files. One command should help you find the right UID (I'll include the command and output):

$ grep -ri noscript
Binary file {73a6fe31-595d-460b-a920-fcc0f8843232}.xpi matches

And indeed if you open the file in an editor that can view it (it's a ZIP file incidentally) you'd see it references noscript. (You probably don't even need '-r' but I included it in case of some weird set up; -i is for case-insensitive). Now copy the UID which means including the { through the } and then go back to Firefox about:config page; search again for 'legacy' and double-click on the key (if you get a warning about the risk of about:config confirm you understand it and move on): extensions.legacy.exceptions. This should bring up a text field that you can modify. Now if it's empty you can just paste in the UID you just found and click OK; otherwise you need to go to the end (hitting the 'End' key on your keyboard should do that or you can scroll all the way over). At the end of the input type a comma (',') and then paste the UID in and then click OK.

At this point you should close Firefox and then start it again. NoScript should then work at this point. If not then you might have done something wrong and I'm not sure how to help you; and if you get stuck on the way the same goes (I really should set up some kind of contact form or another but until then I have to apologise in advance).

There is possibly one other step you might consider: cursing Mozilla. It won't make any difference as far as the addons go but at least for me writing that rant above was very needed!