Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: ext/background.js

Issue 29646589: Issue 6191 - Update frame structure for Chrome Web Store pages (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Dec. 21, 2017, 1:55 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/background.js
===================================================================
--- a/ext/background.js
+++ b/ext/background.js
@@ -259,17 +259,20 @@
["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:")
+ if ((url.protocol != "http:" && url.protocol != "https:") ||
+ // Chrome doesn't dispatch webRequest.onHeadersReceived for
+ // Web Store URLs.
+ url.href.startsWith("https://chrome.google.com/webstore/"))
kzar 2018/01/05 16:46:20 I guess we should only do this for Chrome (or Chro
Manish Jethani 2018/01/12 07:25:03 Ideally yes, but it's probably OK if the frame str
Manish Jethani 2018/01/12 07:31:57 By the way, if it wasn't for Edge, we could have u
{
updatePageFrameStructure(details.frameId, details.tabId, details.url,
details.parentFrameId);
}
});
function forgetTab(tabId)
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld