1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-08 08:34:12 +01:00

Get rid of some selfs

This commit is contained in:
Kris Maglione
2009-11-10 13:30:52 -05:00
parent a1dbd3fa7a
commit e6cbf92ddb
2 changed files with 136 additions and 9 deletions

View File

@@ -31,15 +31,13 @@ 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) {
self._store.push(new AutoCommand(event, RegExp(regex), cmd));
});
this._store.push(new AutoCommand(event, RegExp(regex), cmd));
}, this);
},
/**