1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 16:17:59 +01:00

Fix :runtime completion.

This commit is contained in:
Kris Maglione
2010-12-17 20:01:59 -05:00
parent 754d490a56
commit 8f4d26f9ac
11 changed files with 39 additions and 38 deletions

View File

@@ -664,7 +664,7 @@ const Commands = Module("commands", {
*/
hasDomain: function (command, host) {
try {
for (let [cmd, args] in this._subCommands(command))
for (let [cmd, args] in this.subCommands(command))
if (Array.concat(cmd.domains(args)).some(function (domain) util.isSubdomain(domain, host)))
return true;
}
@@ -682,7 +682,7 @@ const Commands = Module("commands", {
* @returns {boolean}
*/
hasPrivateData: function (command) {
for (let [cmd, args] in this._subCommands(command))
for (let [cmd, args] in this.subCommands(command))
if (cmd.privateData)
return !callable(cmd.privateData) || cmd.privateData(args);
return false;
@@ -1059,7 +1059,7 @@ const Commands = Module("commands", {
while (str);
},
_subCommands: function (command) {
subCommands: function (command) {
let commands = [command];
while (command = commands.shift())
try {