diff --git a/core/interceptor.js b/core/interceptor.js index fe72c264..0f8b4ad7 100644 --- a/core/interceptor.js +++ b/core/interceptor.js @@ -33,6 +33,13 @@ var interceptor = {}; interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) { let validCandidate, targetDetails, targetDomain, isGoogleFont, isGoogleMaterialIcons, initiatorDomain, isListed; + if (requestDetails['type'] === WebRequestType.MAIN_FRAME && + helpers.checkAllowlisted(tab.url, requestAnalyzer.allowlistedDomains)) { + return { + 'cancel': false + }; + } + targetDetails = requestAnalyzer.getLocalTarget(requestDetails, tab.url); if (targetDetails['result'] === 'blocked') { return { @@ -85,6 +92,9 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) { return interceptor._handleMissingCandidate(requestDetails.url, tabIdentifier); } + console.log(`${LogString.PREFIX} ${LogString.REPLACED_RESOURCE} ${targetDetails.path}`); + log.append(tab.url, requestDetails.url, targetDetails.path, false); + return { 'redirectUrl': chrome.runtime.getURL(targetDetails.path + fileGuard.secret) }; diff --git a/core/request-analyzer.js b/core/request-analyzer.js index c2718c4c..684c0ae2 100644 --- a/core/request-analyzer.js +++ b/core/request-analyzer.js @@ -202,9 +202,6 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel break; } - console.log(`${LogString.PREFIX} ${LogString.REPLACED_RESOURCE} ${targetPath}`); - log.append(initiator, channelHost + channelPath, targetPath, false); - // Prepare and return a local target. return { 'source': channelHost, diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 8314238d..754d9578 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -50,6 +50,10 @@
  • jquery-minicolors v2.3.6 (#1127)
  • in-view v0.6.1 (#1127)
  • +

    Improved

    +