From 27de7d4323288fc25b2c78b3f9bb630c0955f8a3 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 22 Apr 2015 09:23:36 -0400 Subject: [PATCH] code review: no need for {inline-script} suffix --- src/js/traffic.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/js/traffic.js b/src/js/traffic.js index 33fc718f7..e93a404aa 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -315,10 +315,10 @@ var onHeadersReceived = function(details) { return; } - // Frame id of frame request is the their own id, while the request is made + // Frame id of frame request is their own id, while the request is made // in the context of the parent. var context = pageStore.createContextFromFrameId(details.parentFrameId); - context.requestURL = details.url + '{inline-script}'; + context.requestURL = details.url; context.requestHostname = details.hostname; context.requestType = 'inline-script'; @@ -345,14 +345,12 @@ var onHeadersReceived = function(details) { var onRootFrameHeadersReceived = function(details) { var tabId = details.tabId; - var requestURL = details.url; - var requestHostname = details.hostname; var µb = µBlock; // Check if the main_frame is a download // ... if ( headerValue(details.responseHeaders, 'content-disposition').lastIndexOf('attachment', 0) === 0 ) { - µb.tabContextManager.unpush(tabId, requestURL); + µb.tabContextManager.unpush(tabId, details.url); } // Lookup the page store associated with this tab id. @@ -363,8 +361,8 @@ var onRootFrameHeadersReceived = function(details) { // I can't think of how pageStore could be null at this point. var context = pageStore.createContextFromPage(); - context.requestURL = requestURL + '{inline-script}'; - context.requestHostname = requestHostname; + context.requestURL = details.url; + context.requestHostname = details.hostname; context.requestType = 'inline-script'; var result = pageStore.filterRequestNoCache(context);