[Pkg-mozext-commits] [personasplus] 52/76: Theme Info Bar Undo Fix by Shutdown
David Prévot
taffit at moszumanska.debian.org
Fri Aug 4 21:45:07 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository personasplus.
commit 3793be6af14bb5c428108ad412dc9433fdb91c26
Author: Baris Derin <baris at barisderin.com>
Date: Tue Nov 1 18:19:01 2016 +0200
Theme Info Bar Undo Fix by Shutdown
Theme Info Bar Undo Fix by Shutdown event. This will remove all
notification box related to Personas Plus automatically at shutdown.
---
extension/bootstrap.js | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/extension/bootstrap.js b/extension/bootstrap.js
index 8d194a4..e7b69da 100644
--- a/extension/bootstrap.js
+++ b/extension/bootstrap.js
@@ -93,6 +93,24 @@ var PersonasPlusBootstrapAddon = {
LightweightThemeManager.forgetUsedTheme("15131");
}
}
+ var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
+ var windows = wm.getEnumerator(this.getWindowType());
+ while (windows.hasMoreElements()) {
+ var window = windows.getNext().QueryInterface(Ci.nsIDOMWindow);
+ var gBrowser = window.getBrowser();
+ var num = gBrowser.browsers.length;
+ for (var i = 0; i < num; i++) {
+ var b = gBrowser.getBrowserAtIndex(i);
+ var not1 = gBrowser.getNotificationBox(b).getNotificationWithValue("personas-plus-private-browsing-warning");
+ if (not1) {
+ gBrowser.getNotificationBox(b).removeNotification(not1);
+ }
+ var not2 = gBrowser.getNotificationBox(b).getNotificationWithValue("lwtheme-install-notification");
+ if (not2) {
+ gBrowser.getNotificationBox(b).removeNotification(not2);
+ }
+ }
+ }
},
requestAddPrerequisites: function(data) {
this.addResourceProtocol(data);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/personasplus.git
More information about the Pkg-mozext-commits
mailing list