mirror of https://github.com/gorhill/uBlock.git
this fixes #1001
This commit is contained in:
parent
f6fe56fc36
commit
6dd4a244fc
|
@ -160,6 +160,13 @@ var onBeforeBehindTheSceneRequest = function(details) {
|
||||||
pageStore.requestHostname = details.hostname;
|
pageStore.requestHostname = details.hostname;
|
||||||
pageStore.requestType = details.type;
|
pageStore.requestType = details.type;
|
||||||
|
|
||||||
|
// https://github.com/gorhill/uBlock/issues/1001
|
||||||
|
// Never block request for root document.
|
||||||
|
if ( details.type === 'main_frame' && details.parentFrameId === -1 ) {
|
||||||
|
pageStore.logRequest(pageStore, '');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Blocking behind-the-scene requests can break a lot of stuff: prevent
|
// Blocking behind-the-scene requests can break a lot of stuff: prevent
|
||||||
// browser updates, prevent extension updates, prevent extensions from
|
// browser updates, prevent extension updates, prevent extensions from
|
||||||
// working properly, etc.
|
// working properly, etc.
|
||||||
|
@ -260,18 +267,6 @@ var onHeadersReceived = function(details) {
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
var headerStartsWith = function(headers, prefix) {
|
|
||||||
var i = headers.length;
|
|
||||||
while ( i-- ) {
|
|
||||||
if ( headers[i].name.toLowerCase().lastIndexOf(prefix, 0) === 0 ) {
|
|
||||||
return headers[i].value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
};
|
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
vAPI.net.onBeforeRequest = {
|
vAPI.net.onBeforeRequest = {
|
||||||
urls: [
|
urls: [
|
||||||
'http://*/*',
|
'http://*/*',
|
||||||
|
|
Loading…
Reference in New Issue