|
@ -854,7 +854,8 @@ var requestTypeNormalizer = { |
|
|
|
|
|
|
|
|
/******************************************************************************/ |
|
|
/******************************************************************************/ |
|
|
|
|
|
|
|
|
chrome.webRequest.onBeforeRequest.addListener( |
|
|
|
|
|
|
|
|
var start = function() { |
|
|
|
|
|
chrome.webRequest.onBeforeRequest.addListener( |
|
|
//function(details) {
|
|
|
//function(details) {
|
|
|
// quickProfiler.start('onBeforeRequest');
|
|
|
// quickProfiler.start('onBeforeRequest');
|
|
|
// var r = onBeforeRequestHandler(details);
|
|
|
// var r = onBeforeRequestHandler(details);
|
|
@ -880,11 +881,11 @@ chrome.webRequest.onBeforeRequest.addListener( |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
[ "blocking" ] |
|
|
[ "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, |
|
|
onBeforeSendHeadersHandler, |
|
|
{ |
|
|
{ |
|
|
'urls': [ |
|
|
'urls': [ |
|
@ -893,9 +894,9 @@ chrome.webRequest.onBeforeSendHeaders.addListener( |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
['blocking', 'requestHeaders'] |
|
|
['blocking', 'requestHeaders'] |
|
|
); |
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
chrome.webRequest.onHeadersReceived.addListener( |
|
|
|
|
|
|
|
|
chrome.webRequest.onHeadersReceived.addListener( |
|
|
onHeadersReceived, |
|
|
onHeadersReceived, |
|
|
{ |
|
|
{ |
|
|
'urls': [ |
|
|
'urls': [ |
|
@ -904,9 +905,9 @@ chrome.webRequest.onHeadersReceived.addListener( |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
['blocking', 'responseHeaders'] |
|
|
['blocking', 'responseHeaders'] |
|
|
); |
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
chrome.webRequest.onErrorOccurred.addListener( |
|
|
|
|
|
|
|
|
chrome.webRequest.onErrorOccurred.addListener( |
|
|
onErrorOccurredHandler, |
|
|
onErrorOccurredHandler, |
|
|
{ |
|
|
{ |
|
|
'urls': [ |
|
|
'urls': [ |
|
@ -914,12 +915,14 @@ chrome.webRequest.onErrorOccurred.addListener( |
|
|
"https://*/*" |
|
|
"https://*/*" |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
); |
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
/******************************************************************************/ |
|
|
/******************************************************************************/ |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
blockedRootFramePrefix: 'data:text/html;base64,' + btoa(rootFrameReplacement).slice(0, 80) |
|
|
|
|
|
|
|
|
blockedRootFramePrefix: 'data:text/html;base64,' + btoa(rootFrameReplacement).slice(0, 80), |
|
|
|
|
|
start: start |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
/******************************************************************************/ |
|
|
/******************************************************************************/ |
|
|