code review: no need for {inline-script} suffix

This commit is contained in:
gorhill 2015-04-22 09:23:36 -04:00
parent b65eeacbaf
commit 27de7d4323

View file

@ -315,10 +315,10 @@ var onHeadersReceived = function(details) {
return; 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. // in the context of the parent.
var context = pageStore.createContextFromFrameId(details.parentFrameId); var context = pageStore.createContextFromFrameId(details.parentFrameId);
context.requestURL = details.url + '{inline-script}'; context.requestURL = details.url;
context.requestHostname = details.hostname; context.requestHostname = details.hostname;
context.requestType = 'inline-script'; context.requestType = 'inline-script';
@ -345,14 +345,12 @@ var onHeadersReceived = function(details) {
var onRootFrameHeadersReceived = function(details) { var onRootFrameHeadersReceived = function(details) {
var tabId = details.tabId; var tabId = details.tabId;
var requestURL = details.url;
var requestHostname = details.hostname;
var µb = µBlock; var µb = µBlock;
// Check if the main_frame is a download // Check if the main_frame is a download
// ... // ...
if ( headerValue(details.responseHeaders, 'content-disposition').lastIndexOf('attachment', 0) === 0 ) { 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. // 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. // I can't think of how pageStore could be null at this point.
var context = pageStore.createContextFromPage(); var context = pageStore.createContextFromPage();
context.requestURL = requestURL + '{inline-script}'; context.requestURL = details.url;
context.requestHostname = requestHostname; context.requestHostname = details.hostname;
context.requestType = 'inline-script'; context.requestType = 'inline-script';
var result = pageStore.filterRequestNoCache(context); var result = pageStore.filterRequestNoCache(context);