Index: ext/background.js |
=================================================================== |
--- a/ext/background.js |
+++ b/ext/background.js |
@@ -258,20 +258,24 @@ |
{types: ["main_frame", "sub_frame"], urls: ["http://*/*", "https://*/*"]}, |
["responseHeaders"]); |
browser.webNavigation.onBeforeNavigate.addListener(details => |
{ |
// Since we can only listen for HTTP(S) responses using |
// webRequest.onHeadersReceived we must update the page structure here for |
// other navigations. |
- let url = new URL(details.url); |
- if (url.protocol != "http:" && url.protocol != "https:") |
+ let {url} = details; |
+ if (!(url.startsWith("http:") || |
+ url.startsWith("https:") && |
+ // Chrome doesn't dispatch webRequest.onHeadersReceived |
+ // for Web Store URLs. |
+ !url.startsWith("https://chrome.google.com/webstore/"))) |
{ |
- updatePageFrameStructure(details.frameId, details.tabId, details.url, |
+ updatePageFrameStructure(details.frameId, details.tabId, url, |
details.parentFrameId); |
} |
}); |
function forgetTab(tabId) |
{ |
ext.pages.onRemoved._dispatch(tabId); |