mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 10:57:58 +01:00
Support modified third-party cookie behavior. Closes issue #60.
This commit is contained in:
@@ -856,14 +856,18 @@ var Commands = Module("commands", {
|
||||
/** @property {string} The last executed Ex command line. */
|
||||
repeat: null,
|
||||
|
||||
add: function add() {
|
||||
add: function add(names, description, action, extra={}, replace=false) {
|
||||
let { caller } = Components.stack;
|
||||
|
||||
let group = this.builtin;
|
||||
if (!util.isDactyl(Components.stack.caller)) {
|
||||
if (!util.isDactyl(caller)) {
|
||||
deprecated.warn(add, "commands.add", "group.commands.add");
|
||||
group = this.user;
|
||||
}
|
||||
|
||||
return apply(group, "_add", arguments);
|
||||
const { contexts } = this.modules;
|
||||
extra.definedAt = contexts.getCaller(caller);
|
||||
return apply(group, "add", arguments);
|
||||
},
|
||||
addUserCommand: deprecated("group.commands.add", { get: function addUserCommand() this.user.bound._add }),
|
||||
getUserCommands: deprecated("iter(group.commands)", function getUserCommands() iter(this.user).toArray()),
|
||||
|
||||
Reference in New Issue
Block a user