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

Unified Diff: firstRun.js

Issue 8689057: adblockpluschrome: Fix popup origin check when running on adblockplus.org (Closed)
Patch Set: Created Oct. 26, 2012, 11: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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firstRun.js
===================================================================
--- a/firstRun.js
+++ b/firstRun.js
@@ -2,6 +2,7 @@
var require = backgroundPage.require;
var Prefs = require("prefs").Prefs;
var Utils = require("utils").Utils;
+var Filter = require("filterClasses").Filter;
function openSharePopup(url)
{
@@ -11,7 +12,8 @@
var popupMessageListener = function(event)
{
- if (event.origin !== url)
+ var originFilter = Filter.fromText("||adblockplus.org^");
+ if (!originFilter.matches(event.origin, "OTHER", null, null))
return;
iframe.width = event.data.width;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld