Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: popupBlocker.js

Issue 6346177440120832: Added abstraction for frames, to fix domain-based rules, whitelisting and ad counter on Safari (Closed)
Patch Set: Addressed another comment Created Jan. 20, 2014, 8:50 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « popup.js ('k') | safari/ext/background.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « popup.js ('k') | safari/ext/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld