1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 10:54:13 +01:00

Fix live update issues.

This commit is contained in:
Kris Maglione
2011-03-07 17:45:22 -05:00
parent c08c0dc19f
commit f002825d10
9 changed files with 52 additions and 29 deletions

View File

@@ -692,9 +692,13 @@ var Commands = Module("commands", {
repeat: null,
add: function add() {
util.assert(util.isDactyl(Components.stack.caller),
"User scripts may not add builtin commands. Please use group.commands.add instead.");
return this.builtin._add.apply(this.builtin, arguments);
let group = this.builtin;
if (!util.isDactyl(Components.stack.caller)) {
deprecated.warn(add, "commands.add", "group.commands.add");
group = this.user;
}
return group._add.apply(group, arguments);
},
addUserCommand: deprecated("group.commands.add", { get: function addUserCommand() this.user.closure._add }),
getUserCommands: deprecated("iter(group.commands)", function getUserCommands() iter(this.user).toArray()),