mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +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,
|
...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) => {
|
.then((blocker) => {
|
||||||
if (session) {
|
if (session) {
|
||||||
blocker.enableBlockingInSession(session);
|
blocker.enableBlockingInSession(session);
|
||||||
|
|||||||
Reference in New Issue
Block a user