You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Brief description of the problem: Unlike other tridactyl autocommands, if you add multiple autocmds for the same pattern then they will all be run. I expected only the most recent autocmd to run.
Open the debugging inspector for tridactyl and visit example.com. Observe that both "1" and "2" are logged.
:autocmddelete unregisters only the most recent listener.
Possible fixes:
Easiest would be to make src/background/webrequests.ts:registerWebRequestAutocmd unregister any pre-existing autocommand for the given event and pattern.
The text was updated successfully, but these errors were encountered:
Tridactyl version: 1.24.0pre6973-2414aba4
Firefox version: Mozilla Firefox 122.0.1
Operating system: win
Brief description of the problem: Unlike other tridactyl autocommands, if you add multiple autocmds for the same pattern then they will all be run. I expected only the most recent autocmd to run.
Steps to reproduce:
:autocmd BeforeRequest https://example.com () => console.log(1)
:autocmd BeforeRequest https://example.com () => console.log(2)
:autocmddelete
unregisters only the most recent listener.Easiest would be to make src/background/webrequests.ts:registerWebRequestAutocmd unregister any pre-existing autocommand for the given event and pattern.
The text was updated successfully, but these errors were encountered: