1
0
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:
Kris Maglione
2015-06-12 23:50:04 -07:00
parent 1b965147ff
commit 07928ba263
3 changed files with 10 additions and 5 deletions

View File

@@ -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()),