mirror of https://github.com/gorhill/uBlock.git
no need to test parentFrameId for `main_frame` requests
This commit is contained in:
parent
4e9496b2f8
commit
aab341dbd9
|
@ -54,7 +54,7 @@ var onBeforeRequest = function(details) {
|
|||
// https://github.com/gorhill/uBlock/issues/1001
|
||||
// This must be executed regardless of whether the request is
|
||||
// behind-the-scene
|
||||
if ( requestType === 'main_frame' && details.parentFrameId === -1 ) {
|
||||
if ( requestType === 'main_frame' ) {
|
||||
pageStore = µb.bindTabToPageStats(tabId, requestURL, 'beforeRequest');
|
||||
if ( pageStore !== null ) {
|
||||
pageStore.requestURL = requestURL;
|
||||
|
@ -221,7 +221,7 @@ var onHeadersReceived = function(details) {
|
|||
var µb = µBlock;
|
||||
var pageStore = µb.pageStoreFromTabId(tabId);
|
||||
if ( !pageStore ) {
|
||||
if ( details.type === 'main_frame' && details.parentFrameId === -1 ) {
|
||||
if ( details.type === 'main_frame' ) {
|
||||
pageStore = µb.bindTabToPageStats(tabId, requestURL, 'beforeRequest');
|
||||
}
|
||||
if ( !pageStore ) {
|
||||
|
|
Loading…
Reference in New Issue