|
|
@ -854,7 +854,8 @@ var requestTypeNormalizer = { |
|
|
|
|
|
|
|
/******************************************************************************/ |
|
|
|
|
|
|
|
chrome.webRequest.onBeforeRequest.addListener( |
|
|
|
var start = function() { |
|
|
|
chrome.webRequest.onBeforeRequest.addListener( |
|
|
|
//function(details) {
|
|
|
|
// quickProfiler.start('onBeforeRequest');
|
|
|
|
// var r = onBeforeRequestHandler(details);
|
|
|
@ -880,11 +881,11 @@ chrome.webRequest.onBeforeRequest.addListener( |
|
|
|
] |
|
|
|
}, |
|
|
|
[ "blocking" ] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
//console.log('µMatrix > Beginning to intercept net requests at %s', (new Date()).toISOString());
|
|
|
|
//console.log('µMatrix > Beginning to intercept net requests at %s', (new Date()).toISOString());
|
|
|
|
|
|
|
|
chrome.webRequest.onBeforeSendHeaders.addListener( |
|
|
|
chrome.webRequest.onBeforeSendHeaders.addListener( |
|
|
|
onBeforeSendHeadersHandler, |
|
|
|
{ |
|
|
|
'urls': [ |
|
|
@ -893,9 +894,9 @@ chrome.webRequest.onBeforeSendHeaders.addListener( |
|
|
|
] |
|
|
|
}, |
|
|
|
['blocking', 'requestHeaders'] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
chrome.webRequest.onHeadersReceived.addListener( |
|
|
|
chrome.webRequest.onHeadersReceived.addListener( |
|
|
|
onHeadersReceived, |
|
|
|
{ |
|
|
|
'urls': [ |
|
|
@ -904,9 +905,9 @@ chrome.webRequest.onHeadersReceived.addListener( |
|
|
|
] |
|
|
|
}, |
|
|
|
['blocking', 'responseHeaders'] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
chrome.webRequest.onErrorOccurred.addListener( |
|
|
|
chrome.webRequest.onErrorOccurred.addListener( |
|
|
|
onErrorOccurredHandler, |
|
|
|
{ |
|
|
|
'urls': [ |
|
|
@ -914,12 +915,14 @@ chrome.webRequest.onErrorOccurred.addListener( |
|
|
|
"https://*/*" |
|
|
|
] |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
/******************************************************************************/ |
|
|
|
|
|
|
|
return { |
|
|
|
blockedRootFramePrefix: 'data:text/html;base64,' + btoa(rootFrameReplacement).slice(0, 80) |
|
|
|
blockedRootFramePrefix: 'data:text/html;base64,' + btoa(rootFrameReplacement).slice(0, 80), |
|
|
|
start: start |
|
|
|
}; |
|
|
|
|
|
|
|
/******************************************************************************/ |
|
|
|