8000 [mv3] Just force a reload when URL doesn't change · gorhill/uBlock@3ff54b7 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 3ff54b7

Browse files
committed
[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.
1 parent 63eeaae commit 3ff54b7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

platform/mv3/extension/js/popup.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,13 @@ async function commitFilteringMode() {
109109
setFilteringMode(actualLevel);
110110
}
111111
if ( actualLevel !== beforeLevel && popupPanelData.autoReload ) {
112+
const justReload = tabURL.href === currentTab.url;
112113
self.setTimeout(( ) => {
113-
browser.tabs.update(currentTab.id, {
114-
url: tabURL.href,
115-
});
114+
if ( justReload ) {
115+
browser.tabs.reload(currentTab.id);
116+
} else {
117+
browser.tabs.update(currentTab.id, { url: tabURL.href });
118+
}
116119
}, 437);
117120
}
118121
}

0 commit comments

Comments
 (0)
0