mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 09:31:01 +01:00
this fixes #1001
This commit is contained in:
parent
f6fe56fc36
commit
6dd4a244fc
1 changed files with 7 additions and 12 deletions
|
@ -160,6 +160,13 @@ var onBeforeBehindTheSceneRequest = function(details) {
|
|||
pageStore.requestHostname = details.hostname;
|
||||
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
|
||||
// browser updates, prevent extension updates, prevent extensions from
|
||||
// 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 = {
|
||||
urls: [
|
||||
'http://*/*',
|
||||
|
|
Loading…
Reference in a new issue