1
0
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:
anekos
2009-11-10 18:42:27 +09:00
parent efaba491cd
commit 2e173d3e2e

4
common/content/autocommands.js Normal file → Executable file
View 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));
}); });
}, },