From c09f7c341c81d83e7933aea6db94eeebcb1f32f1 Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 6 Jul 2018 00:20:01 +0300 Subject: [PATCH] use more of webRequest info to restrict stripResources --- popup/search-results.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/popup/search-results.js b/popup/search-results.js index a6636d43..0a7b489b 100755 --- a/popup/search-results.js +++ b/popup/search-results.js @@ -808,7 +808,12 @@ window.addEventListener('showStyles:done', function _() { let frameId; const stripResources = info => { - if (!frameId && info.url === BASE_URL + '/') { + if (!frameId && + info.frameId && + info.type === 'sub_frame' && + (info.initiator === location.origin || !info.initiator) && // Chrome 63+ + (info.originUrl === location.href || !info.originUrl) && // FF 48+ + info.url === BASE_URL + '/') { frameId = info.frameId; } else if (frameId === info.frameId && info.type !== 'xmlhttprequest') { return {redirectUrl: 'data:,'};