Skip to content

Instantly share code, notes, and snippets.

@angelsl
Last active August 25, 2018 16:22
Show Gist options
  • Save angelsl/7e85afd3a5fcb3231df83c191b6d91a6 to your computer and use it in GitHub Desktop.
Save angelsl/7e85afd3a5fcb3231df83c191b6d91a6 to your computer and use it in GitHub Desktop.
// 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