-// Copyright (c) 2009-2013 Kris Maglione <maglione.k@gmail.com>
+// Copyright (c) 2009-2014 Kris Maglione <maglione.k@gmail.com>
// Copyright (c) 2009-2010 by Doug Kearns <dougkearns@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
name: "extr[ehash]",
description: "Reload an extension",
action: function (addon) {
- util.assert(config.haveGecko("2b"), _("command.notUseful", config.host));
util.flushCache();
util.timeout(function () {
addon.userDisabled = true;
},
commandAllowed: function commandAllowed(cmd) {
- util.assert(Set.has(actions, cmd), _("addon.unknownCommand"));
+ util.assert(hasOwnProperty(actions, cmd),
+ _("addon.unknownCommand"));
let action = actions[cmd];
if ("perm" in action && !(this.permissions & AddonManager["PERM_CAN_" + action.perm.toUpperCase()]))
this.modules = modules;
this.filter = filter && filter.toLowerCase();
this.nodes = {};
- this.addons = [];
+ this.addons = {};
this.ready = false;
- AddonManager.getAddonsByTypes(types, this.closure(function (addons) {
+ AddonManager.getAddonsByTypes(types, addons => {
this._addons = addons;
if (this.document)
this._init();
- }));
+ });
AddonManager.addAddonListener(this);
},
cleanup: function cleanup() {
},
_init: function _init() {
- this._addons.forEach(this.closure.addAddon);
+ this._addons.forEach(this.bound.addAddon);
this.ready = true;
this.update();
},