| Index: popupBlocker.js |
| =================================================================== |
| --- a/popupBlocker.js |
| +++ b/popupBlocker.js |
| @@ -1,6 +1,6 @@ |
| /* |
| * This file is part of Adblock Plus <http://adblockplus.org/>, |
| - * Copyright (C) 2006-2013 Eyeo GmbH |
| + * Copyright (C) 2006-2014 Eyeo GmbH |
| * |
| * Adblock Plus is free software: you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 3 as |
| @@ -15,16 +15,19 @@ |
| * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| */ |
| -if (require("info").platform == "chromium" && "webNavigation" in chrome) |
| +if (require("info").platform == "chromium") |
| { |
| var tabsLoading = {}; |
| chrome.webNavigation.onCreatedNavigationTarget.addListener(function(details) |
| { |
| - if (isFrameWhitelisted(details.sourceTabId, details.sourceFrameId)) |
| + var sourcePage = new ext.Page({id: details.sourceTabId}); |
| + var sourceFrame = ext.getFrame(details.sourceTabId, details.sourceFrameId); |
| + |
| + if (!sourceFrame || isFrameWhitelisted(sourcePage, sourceFrame)) |
| return; |
| - var openerUrl = getFrameUrl(details.sourceTabId, details.sourceFrameId); |
| + var openerUrl = sourceFrame.url; |
| if (!openerUrl) |
| { |
| // We don't know the opener tab |