From 63ca29158ab91373b5722ba667ddb536fb8f62cb Mon Sep 17 00:00:00 2001 From: hackademix Date: Fri, 15 May 2020 21:33:16 +0200 Subject: [PATCH] Fixed 3rd party scripts blocking regression on Firefox Trunk due to XBL removal (thanks guardao for reporting). --- src/bg/RequestGuard.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js index 725a2bf..9cc2eb0 100644 --- a/src/bg/RequestGuard.js +++ b/src/bg/RequestGuard.js @@ -20,9 +20,6 @@ var RequestGuard = (() => { media: "media", other: "", }; - const allTypes = UA.isMozilla ? Object.keys(policyTypesMap) - : ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", - "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "other"]; Object.assign(policyTypesMap, {"webgl": "webgl"}); // fake types const TabStatus = { @@ -509,7 +506,7 @@ var RequestGuard = (() => { let allUrls = [""]; let docTypes = ["main_frame", "sub_frame", "object"]; let filterDocs = {urls: allUrls, types: docTypes}; - let filterAll = {urls: allUrls, types: allTypes}; + let filterAll = {urls: allUrls}; listen("onBeforeRequest", filterAll, ["blocking"]); listen("onHeadersReceived", filterDocs, ["blocking", "responseHeaders"]); (listeners.onHeadersReceivedLast = new LastListener(wr.onHeadersReceived, request => {