mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-30 23:25:47 +01:00
Fix a wrong reference.
This commit is contained in:
4
common/content/autocommands.js
Normal file → Executable file
4
common/content/autocommands.js
Normal file → Executable file
@@ -31,12 +31,14 @@ const AutoCommands = Module("autocommands", {
|
|||||||
* @param {string} cmd The Ex command to run.
|
* @param {string} cmd The Ex command to run.
|
||||||
*/
|
*/
|
||||||
add: function (events, regex, cmd) {
|
add: function (events, regex, cmd) {
|
||||||
|
let self = this;
|
||||||
|
|
||||||
if (typeof events == "string") {
|
if (typeof events == "string") {
|
||||||
events = events.split(",");
|
events = events.split(",");
|
||||||
liberator.log("DEPRECATED: the events list arg to autocommands.add() should be an array of event names");
|
liberator.log("DEPRECATED: the events list arg to autocommands.add() should be an array of event names");
|
||||||
}
|
}
|
||||||
events.forEach(function (event) {
|
events.forEach(function (event) {
|
||||||
this._store.push(new AutoCommand(event, RegExp(regex), cmd));
|
self._store.push(new AutoCommand(event, RegExp(regex), cmd));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user