Last active
August 25, 2018 16:22
-
-
Save angelsl/7e85afd3a5fcb3231df83c191b6d91a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste in browser console | |
(function() { | |
var s = {}; | |
Components.utils.import("resource://gre/modules/addons/XPIProvider.jsm", s); | |
Components.utils.import("resource://gre/modules/addons/XPIDatabase.jsm", s); | |
s.XPIDatabase.getVisibleAddons(false).then(function (exts) { | |
for (var ext of exts) { | |
if (ext.type.indexOf("extension") > -1 | |
&& (ext.location.name == "app-system-defaults" || ext.location.name == "app-global")) { | |
s.XPIDatabase.updateAddonDisabledState(ext, true); | |
console.log("Disabled " + ext.path); | |
} else { console.log("Skipping " + ext.path + " (" + ext.location.name + ")"); } | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment