mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 10:47:58 +01:00
Fix some JS warnings.
This commit is contained in:
@@ -222,11 +222,10 @@ const Command = Class("Command", {
|
|||||||
* @param {Array} specs An array of command name specs to parse.
|
* @param {Array} specs An array of command name specs to parse.
|
||||||
* @returns {Array}
|
* @returns {Array}
|
||||||
*/
|
*/
|
||||||
parseSpecs: function (specs) {
|
parseSpecs: function parseSpecs(specs) {
|
||||||
return specs.map(function (spec) {
|
return specs.map(function (spec) {
|
||||||
let long = spec.replace(/[[\]]/g, "");
|
let [, head, tail] = spec.match(/(\w+)(?:\[(.*)])?/);
|
||||||
let short = spec.replace(/\[.*]/, "");
|
return tail ? [head + tail, head] : [head];
|
||||||
return short == long ? [long] : [long, short];
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -740,7 +740,7 @@ const Completion = Module("completion", {
|
|||||||
}
|
}
|
||||||
//}}}
|
//}}}
|
||||||
}, {
|
}, {
|
||||||
UrlCompleter: Struct("name", "description", "completer"),
|
UrlCompleter: Struct("name", "description", "completer")
|
||||||
});
|
});
|
||||||
|
|
||||||
// vim: set fdm=marker sw=4 ts=4 et:
|
// vim: set fdm=marker sw=4 ts=4 et:
|
||||||
|
|||||||
@@ -610,5 +610,5 @@ const JavaScript = Module("javascript", {
|
|||||||
},
|
},
|
||||||
getter: function () services.get("debugger").isOn
|
getter: function () services.get("debugger").isOn
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -873,7 +873,7 @@ const Util = Module("util", {
|
|||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
// vim: set fdm=marker sw=4 ts=4 et:
|
// vim: set fdm=marker sw=4 ts=4 et:
|
||||||
|
|||||||
Reference in New Issue
Block a user