mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Try to let multiple autocommands run per event
This commit is contained in:
parent
80607484d0
commit
a9bb149bfa
1 changed files with 2 additions and 3 deletions
|
@ -1175,9 +1175,8 @@ loadaucmds("DocStart")
|
|||
export async function loadaucmds(cmdType: "DocStart" | "TabEnter" | "TabLeft") {
|
||||
let aucmds = await config.getAsync("autocmds", cmdType)
|
||||
const ausites = Object.keys(aucmds)
|
||||
// yes, this is lazy
|
||||
const aukey = ausites.find(e => window.document.location.href.search(e) >= 0)
|
||||
if (aukey !== undefined) {
|
||||
const aukeyarr = ausites.filter(e => window.document.location.href.search(e) >= 0)
|
||||
for (let aukey of aukeyarr) {
|
||||
Messaging.message("commandline_background", "recvExStr", [aucmds[aukey]])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue