1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 14:24:17 +01:00

Fix autocommands.

Update calls to AutoCommands#matchAutoCmd.
This commit is contained in:
Doug Kearns
2009-11-14 05:03:17 +11:00
parent afc14aff65
commit 0d2d1bd6e9

View File

@@ -49,7 +49,7 @@ const AutoCommands = Module("autocommands", {
* @returns {AutoCommand[]} * @returns {AutoCommand[]}
*/ */
get: function (event, regex) { get: function (event, regex) {
return this._store.filter(function (autoCmd) matchAutoCmd(autoCmd, event, regex)); return this._store.filter(function (autoCmd) AutoCommands.matchAutoCmd(autoCmd, event, regex));
}, },
/** /**
@@ -60,7 +60,7 @@ const AutoCommands = Module("autocommands", {
* @param {string} regex The URL pattern filter. * @param {string} regex The URL pattern filter.
*/ */
remove: function (event, regex) { remove: function (event, regex) {
this._store = this._store.filter(function (autoCmd) !matchAutoCmd(autoCmd, event, regex)); this._store = this._store.filter(function (autoCmd) !AutoCommands.matchAutoCmd(autoCmd, event, regex));
}, },
/** /**
@@ -75,7 +75,7 @@ const AutoCommands = Module("autocommands", {
// XXX // XXX
this._store.forEach(function (autoCmd) { this._store.forEach(function (autoCmd) {
if (matchAutoCmd(autoCmd, event, regex)) { if (AutoCommands.matchAutoCmd(autoCmd, event, regex)) {
cmds[autoCmd.event] = cmds[autoCmd.event] || []; cmds[autoCmd.event] = cmds[autoCmd.event] || [];
cmds[autoCmd.event].push(autoCmd); cmds[autoCmd.event].push(autoCmd);
} }