←back to thread

1318 points xvector | 5 comments | | HN request time: 0s | source
Show context
gpm ◴[] No.19824410[source]
To re-enable all disabled non-system addons you can do the following. I am not responsible if this fucks up your install:

Open the browser console by hitting ctrl-shift-j

Copy and paste the following code, hit enter. Until mozilla fixes the problem you will need to redo this once every 24 hours:

    // Re-enable *all* extensions

    async function set_addons_as_signed() {
        Components.utils.import("resource://gre/modules/addons/XPIDatabase.jsm");
        Components.utils.import("resource://gre/modules/AddonManager.jsm");
        let addons = await XPIDatabase.getAddonList(a => true);

        for (let addon of addons) {
            // The add-on might have vanished, we'll catch that on the next startup
            if (!addon._sourceBundle.exists())
                continue;

            if( addon.signedState != AddonManager.SIGNEDSTATE_UNKNOWN )
                continue;

            addon.signedState = AddonManager.SIGNEDSTATE_NOT_REQUIRED;
            AddonManagerPrivate.callAddonListeners("onPropertyChanged",
                                                    addon.wrapper,
                                                    ["signedState"]);

            await XPIDatabase.updateAddonDisabledState(addon);

        }
        XPIDatabase.saveChanges();
    }

    set_addons_as_signed();
Edit: Cleanup up code slightly...
replies(13): >>19824419 #>>19824512 #>>19824757 #>>19824939 #>>19825095 #>>19825736 #>>19826031 #>>19826062 #>>19826188 #>>19826298 #>>19826513 #>>19827530 #>>19829476 #
1. moho ◴[] No.19824939[source]
Super useful, thanks.

In my case ctrl+shift+j opens a dumb console that only shows messages and doesn't take any input. I had to go to about:addons, hit F12 for the Dev Tools and paste it in the console there. Worked well.

replies(1): >>19825031 #
2. Rebelgecko ◴[] No.19825031[source]
If you go to about:config and set "devtools.chrome.enabled" to true, the cmd-shift-j thing should work
replies(2): >>19825181 #>>19825221 #
3. leemailll ◴[] No.19825181[source]
This is the step required for me to allow Browser Console for input
4. ezconnect ◴[] No.19825221[source]
I also have to do this to make it work on Win10 firefox console (F12)
replies(1): >>19825371 #
5. wertyyuu ◴[] No.19825371{3}[source]
If some addons DISAPPEARED then you have to restart Firefox, go to addon manager menu, find disappeared addons and disable/enable them.

When I say "disappeared" I mean that addon icon or else is disappeared.