| Index: popupBlocker.js |
| =================================================================== |
| --- a/popupBlocker.js |
| +++ b/popupBlocker.js |
| @@ -22,10 +22,12 @@ |
| chrome.webNavigation.onCreatedNavigationTarget.addListener(function(details) |
| { |
| var sourceTab = new Tab({id: details.sourceTabId}); |
| - if (isFrameWhitelisted(sourceTab, details.sourceFrameId)) |
| + var sourceFrame = new Frame({id: details.sourceFrameId, tab: sourceTab}); |
| + |
| + if (isFrameWhitelisted(sourceTab, sourceFrame)) |
| return; |
| - var openerUrl = getFrameUrl(sourceTab, details.sourceFrameId); |
| + var openerUrl = sourceFrame.url; |
| if (!openerUrl) |
| { |
| // We don't know the opener tab |