mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-04 10:09:38 +02:00
this fixes #1025
This commit is contained in:
parent
7f0c2845dd
commit
1d3dd12fab
@ -2,7 +2,7 @@
|
||||
"manifest_version": 2,
|
||||
|
||||
"name": "uBlock",
|
||||
"version": "0.9.1.0",
|
||||
"version": "0.9.1.1",
|
||||
|
||||
"default_locale": "en",
|
||||
"description": "__MSG_extShortDesc__",
|
||||
|
@ -35,6 +35,7 @@
|
||||
// This is to be used as last-resort fallback in case a tab is found to not
|
||||
// be bound while network requests are fired for the tab.
|
||||
|
||||
var mostRecentRootDocURLTimestamp = 0;
|
||||
var mostRecentRootDocURL = '';
|
||||
|
||||
/******************************************************************************/
|
||||
@ -63,6 +64,7 @@ var onBeforeRequest = function(details) {
|
||||
pageStore.logRequest(pageStore, '');
|
||||
}
|
||||
mostRecentRootDocURL = requestURL;
|
||||
mostRecentRootDocURLTimestamp = Date.now();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -76,6 +78,13 @@ var onBeforeRequest = function(details) {
|
||||
// Lookup the page store associated with this tab id.
|
||||
pageStore = µb.pageStoreFromTabId(tabId);
|
||||
if ( !pageStore ) {
|
||||
// https://github.com/gorhill/uBlock/issues/1025
|
||||
// Google Hangout popup opens without a root frame. So for now we will
|
||||
// just discard that best-guess root frame if it is too far in the
|
||||
// future, at which point it ceases to be a "best guess".
|
||||
if ( (Date.now() - mostRecentRootDocURLTimestamp) >= 500 ) {
|
||||
mostRecentRootDocURL = '';
|
||||
}
|
||||
// https://github.com/gorhill/uBlock/issues/1001
|
||||
// Not a behind-the-scene request, yet no page store found for the
|
||||
// tab id: we will thus bind the last-seen root document to the
|
||||
@ -147,7 +156,7 @@ var onBeforeRequest = function(details) {
|
||||
}
|
||||
|
||||
// Blocked
|
||||
//console.debug('traffic.js > onBeforeRequest(): BLOCK "%s" (%o) because "%s"', details.url, details, result);
|
||||
console.debug('traffic.js > onBeforeRequest(): BLOCK "%s" (%o) because "%s"', details.url, details, result);
|
||||
|
||||
pageStore.logRequest(requestContext, result);
|
||||
|
||||
@ -199,7 +208,7 @@ var onBeforeBehindTheSceneRequest = function(details) {
|
||||
}
|
||||
|
||||
// Blocked
|
||||
//console.debug('traffic.js > onBeforeBehindTheSceneRequest(): BLOCK "%s" (%o) because "%s"', details.url, details, result);
|
||||
console.debug('traffic.js > onBeforeBehindTheSceneRequest(): BLOCK "%s" (%o) because "%s"', details.url, details, result);
|
||||
|
||||
return { 'cancel': true };
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user