[Pkg-mozext-commits] [tabmixplus] 12/123: Show global notification when debug mode is on
David Prévot
taffit at moszumanska.debian.org
Wed Sep 17 21:16:22 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 69b603f87378a689fdbdb8d502aed0a1bfa36e3e
Author: onemen <tabmix.onemen at gmail.com>
Date: Sun Aug 10 14:20:24 2014 +0300
Show global notification when debug mode is on
---
chrome/content/tabmix.js | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 8cabeb3..52d99a4 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -211,6 +211,27 @@ Tabmix.delayedStartup = function TMP_delayedStartup() {
TMP_tabDNDObserver.paddingLeft = this.getStyle(gBrowser.tabContainer, "paddingLeft");
Tabmix.australisUI.init();
+
+ // show global notification when debug mode is on
+ let gnb = Tabmix._debugMode &&
+ (document.getElementById("high-priority-global-notificationbox") ||
+ document.getElementById("global-notificationbox"));
+ if (gnb) {
+ let buttons = [{
+ label: "Disable Debug Mode",
+ accessKey: "D",
+ callback: function () {
+ Tabmix.prefs.setBoolPref("enableDebug", false);
+ }
+ }];
+ let msg = "Tab Mix is in debug mode!\n " +
+ "In case it's activated accidentally, click the button to disalbe it " +
+ "or set 'extensions.tabmix.enableDebug' in about:config to false. " +
+ "Once you disable 'Debug Mode' restart your browser."
+ const errorimage = "chrome://tabmixplus/skin/tmpsmall.png";
+ gnb.appendNotification(msg, "tabmix-debugmode-enabled",
+ errorimage, gnb.PRIORITY_CRITICAL_HIGH, buttons);
+ }
}
var TMP_eventListener = {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list