mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
Do not add network filters in adblocker cache to fix session enhancing
This commit is contained in:
@ -33,7 +33,17 @@ const loadAdBlockerEngine = (
|
||||
...additionalBlockLists,
|
||||
];
|
||||
|
||||
ElectronBlocker.fromLists(fetch, lists, {}, cachingOptions)
|
||||
ElectronBlocker.fromLists(
|
||||
fetch,
|
||||
lists,
|
||||
{
|
||||
// when generating the engine for caching, do not load network filters
|
||||
// So that enhancing the session works as expected
|
||||
// Allowing to define multiple webRequest listeners
|
||||
loadNetworkFilters: session !== undefined,
|
||||
},
|
||||
cachingOptions
|
||||
)
|
||||
.then((blocker) => {
|
||||
if (session) {
|
||||
blocker.enableBlockingInSession(session);
|
||||
|
||||
Reference in New Issue
Block a user