←back to thread

1318 points xvector | 3 comments | | HN request time: 0.823s | 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. acqq ◴[] No.19826513[source]
If you're still not being hit, and if the browser console doesn't accept the input, is it enough to get from the WebConsole

    Math.floor( (new Date()).getTime()/1000 )
and paste the number in "app.update.lastUpdateTime.xpi-signature-verification" to be off the hook for the next 24 hours?
replies(1): >>19826954 #
2. gpm ◴[] No.19826954[source]
Uh... if that outputs a unix date yes (I think) except you need to restart the browser afterwards as well.
replies(1): >>19827233 #
3. acqq ◴[] No.19827233[source]
> if that outputs a unix date yes

Yes, the JavaScript's getTime() is in milliseconds since Jan 1 1970 and the C time_t (which is what I think is used as a timestamp) is in seconds.