pages/search: prevent history pollution

This commit is contained in:
He4eT 2024-01-22 21:10:45 +01:00
commit adf6ab3305
3 changed files with 19 additions and 2 deletions

View file

@ -6,7 +6,10 @@ const store = Store.init({
tabs: browser.tabs,
windows: browser.windows,
onStateUpdate: dom.updateSearchResults,
closeCurrentTab: () => window.close(),
closeCurrentTab: () => {
history.replaceState({}, '', '')
browser.runtime.sendMessage({action: 'closeSender'})
},
})
void inputHandlers.attachInputHandlers(store)