Index: webrequest.js |
=================================================================== |
--- a/webrequest.js |
+++ b/webrequest.js |
@@ -13,17 +13,16 @@ |
* |
* You should have received a copy of the GNU General Public License |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
var FilterNotifier = require("filterNotifier").FilterNotifier; |
var RegExpFilter = require("filterClasses").RegExpFilter; |
var platform = require("info").platform; |
-var showNextNotificationForUrl = require("notificationHelper").showNextNotificationForUrl; |
ext.webRequest.indistinguishableTypes.forEach(function(types) |
{ |
for (var i = 1; i < types.length; i++) |
RegExpFilter.typeMap[types[i]] = RegExpFilter.typeMap[types[0]]; |
}); |
FilterNotifier.addListener(function(action, arg) |
@@ -44,21 +43,16 @@ FilterNotifier.addListener(function(acti |
case "load": |
ext.webRequest.handlerBehaviorChanged(); |
break; |
} |
}); |
function onBeforeRequestAsync(url, type, page, filter) |
{ |
- // We can't listen to onHeadersReceived in Safari so we need to |
- // check for notifications here |
- if (platform != "chromium" && type == "SUBDOCUMENT") |
- showNextNotificationForUrl(url); |
- |
if (filter) |
FilterNotifier.triggerListeners("filter.hitCount", filter, 0, 0, page); |
} |
function onBeforeRequest(url, type, page, frame) |
{ |
if (isFrameWhitelisted(page, frame)) |
return true; |
@@ -93,18 +87,16 @@ if (platform == "chromium") |
return; |
for (var i = 0; i < details.responseHeaders.length; i++) |
{ |
var header = details.responseHeaders[i]; |
if (header.name.toLowerCase() == "x-adblock-key" && header.value) |
processKey(header.value, page, frame); |
} |
- |
- showNextNotificationForUrl(new URL(details.url)); |
} |
chrome.webRequest.onHeadersReceived.addListener( |
onHeadersReceived, |
{ |
urls: ["http://*/*", "https://*/*"], |
types: ["main_frame", "sub_frame"] |
}, |