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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user