mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Just force a reload when URL doesn't change
Most of the time the URL doesn't change and just forcing a reload of the page is sufficient. When a document is strict-blocked, the URL must be updated however.
This commit is contained in:
parent
63eeaae5e9
commit
3ff54b7f2a
1 changed files with 6 additions and 3 deletions
|
|
@ -109,10 +109,13 @@ async function commitFilteringMode() {
|
|||
setFilteringMode(actualLevel);
|
||||
}
|
||||
if ( actualLevel !== beforeLevel && popupPanelData.autoReload ) {
|
||||
const justReload = tabURL.href === currentTab.url;
|
||||
self.setTimeout(( ) => {
|
||||
browser.tabs.update(currentTab.id, {
|
||||
url: tabURL.href,
|
||||
});
|
||||
if ( justReload ) {
|
||||
browser.tabs.reload(currentTab.id);
|
||||
} else {
|
||||
browser.tabs.update(currentTab.id, { url: tabURL.href });
|
||||
}
|
||||
}, 437);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue