// Copyright (c) 2009-2010 by Doug Kearns <dougkearns@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
// Copyright (c) 2009-2010 by Doug Kearns <dougkearns@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
for (let addon in values(addons))
addon.findUpdates(this, AddonManager.UPDATE_WHEN_USER_REQUESTED, null, null);
for (let addon in values(addons))
addon.findUpdates(this, AddonManager.UPDATE_WHEN_USER_REQUESTED, null, null);
- return function (addon) !addon.userDisabled &&
- !(addon.operationsRequiringRestart & (AddonManager.OP_NEEDS_RESTART_ENABLE | AddonManager.OP_NEEDS_RESTART_DISABLE));
+ return addon => (
+ !addon.userDisabled &&
+ !(addon.operationsRequiringRestart & (AddonManager.OP_NEEDS_RESTART_ENABLE
+ | AddonManager.OP_NEEDS_RESTART_DISABLE)));
addon = Addon(addon, this);
this.addons[addon.id] = addon;
addon = Addon(addon, this);
this.addons[addon.id] = addon;
array(["ERROR_NETWORK_FAILURE", "ERROR_INCORRECT_HASH",
"ERROR_CORRUPT_FILE", "ERROR_FILE_ACCESS"])
array(["ERROR_NETWORK_FAILURE", "ERROR_INCORRECT_HASH",
"ERROR_CORRUPT_FILE", "ERROR_FILE_ACCESS"])
AddonManager.getAddonsByTypes(args["-types"], dactyl.wrapCallback(function (list) {
if (!args.bang || command.bang) {
AddonManager.getAddonsByTypes(args["-types"], dactyl.wrapCallback(function (list) {
if (!args.bang || command.bang) {
dactyl.assert(list.length, _("error.invalidArgument", name));
dactyl.assert(list.some(ok), _("error.invalidOperation"));
list = list.filter(ok);
dactyl.assert(list.length, _("error.invalidArgument", name));
dactyl.assert(list.some(ok), _("error.invalidOperation"));
list = list.filter(ok);
- list.forEach(function (addon) command.action.call(this.modules, addon, args.bang), this);
+ list.forEach(addon => { command.action.call(this.modules, addon, args.bang) });
}));
}, {
argCount: "?", // FIXME: should be "1"
bang: true,
completer: function (context, args) {
completion.addon(context, args["-types"]);
}));
}, {
argCount: "?", // FIXME: should be "1"
bang: true,
completer: function (context, args) {
completion.addon(context, args["-types"]);
completion.addonType = function addonType(context) {
let base = ["extension", "theme"];
function update(types) {
completion.addonType = function addonType(context) {
let base = ["extension", "theme"];
function update(types) {
context.incomplete = true;
AddonManager.getAllAddons(function (addons) {
context.incomplete = false;
context.incomplete = true;
AddonManager.getAllAddons(function (addons) {
context.incomplete = false;