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

Unified Diff: lib/appSupport.js

Issue 6286955629248512: disable acceptable ads from first run page (Closed)
Patch Set: trigger popstate event Created May 2, 2014, 11:09 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: lib/appSupport.js
===================================================================
--- a/lib/appSupport.js
+++ b/lib/appSupport.js
@@ -916,6 +916,26 @@
if (Utils.confirm(window, dialogMessage, dialogTitle))
this.setSubscription(url, title);
};
+
+ UI.openFiltersDialog = function()
+ {
+ let window = this.currentWindow;
Wladimir Palant 2014/05/02 11:50:00 Please use UI.currentWindow explicitly - it wasn't
saroyanm 2014/05/02 14:07:27 Done.
+ if (!window)
+ return
+
+ let browser = window.BrowserApp.addTab("about:addons").browser;
Wladimir Palant 2014/05/02 11:50:00 How about: let browser = exports.addTab(window,
saroyanm 2014/05/02 14:07:27 Sorry for not being attentive on that..
+ browser.addEventListener("load", function openAddonPrefs(event)
+ {
+ browser.removeEventListener("load", openAddonPrefs, true);
+ browser._contentWindow.setTimeout(function()
saroyanm 2014/05/02 11:18:30 Couldn't find better approach while aboutAddons.js
Wladimir Palant 2014/05/02 11:50:00 Yes, you need to run this immediately after the pa
saroyanm 2014/05/02 14:07:27 Thanks for pointing on the method, gave me underst
+ {
+ let event = new Event("Event");
+ event.initEvent("popstate", true, false);
+ event.state = {id: require("info").addonID};
+ browser._contentWindow.dispatchEvent(event);
+ }, 200);
+ }, true);
Wladimir Palant 2014/05/02 11:50:00 I don't really see a point for having a capturing
saroyanm 2014/05/02 14:07:27 Yes actually It will not be triggered, not sure wh
+ };
break;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld