From 84bd5c1c0ce4cf6f6270231d826851d3d8a490da Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 1 Jan 2022 18:19:34 -0500 Subject: [PATCH] Offer a way to disable tab-reloading at launch on Chromium-based browsers Related discussion: - https://github.com/gorhill/uBlock/commit/a0a9497b4aca86727b314d8fc31ad345dad08ac8#commitcomment-62560291 The behavior could be seen as annoying to some users, and before this commit there is no way to opt-out of the behavior, introduced in 1.40.0. This commit is only intended for Chromium version of uBO, and setting `suspendTabsUntilReady` to `no` will prevent active tab reload at launch once filter lists are all loaded. In next release, there will be a setting in the "Filter lists" pane to easily control the behavior and `suspendTabsUntilReady` will be removed. --- src/js/traffic.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/traffic.js b/src/js/traffic.js index d4a01bbf6153b..b20b2e9f79f84 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -1150,8 +1150,8 @@ const webRequest = { // Mitigation: force-reload active tabs for environments not // supporting suspended network request listeners. if ( - vAPI.net.canSuspend() !== true || - µb.hiddenSettings.suspendTabsUntilReady === 'no' + vAPI.net.canSuspend() !== true && + µb.hiddenSettings.suspendTabsUntilReady === 'unset' ) { const tabs = await vAPI.tabs.query({ active: true,