1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 18:24:11 +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.
*/
add: function (events, regex, cmd) {
let self = this;
if (typeof events == "string") {
events = events.split(",");
liberator.log("DEPRECATED: the events list arg to autocommands.add() should be an array of event names");
}
events.forEach(function (event) {
this._store.push(new AutoCommand(event, RegExp(regex), cmd));
self._store.push(new AutoCommand(event, RegExp(regex), cmd));
});
},