]> git.donarmstrong.com Git - dactyl.git/blobdiff - common/content/statusline.js
Import r6976 from upstream hg supporting Firefox up to 25.*
[dactyl.git] / common / content / statusline.js
index 4cf50c47813e4a8b119dcfa837eabe5cc4c82941..7b0cd48d59b65da6d38df8b1de4d8e08f1198f96 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (c) 2006-2008 by Martin Stubenschrott <stubenschrott@vimperator.org>
 // Copyright (c) 2007-2011 by Doug Kearns <dougkearns@gmail.com>
-// Copyright (c) 2008-2012 Kris Maglione <maglione.k@gmail.com>
+// Copyright (c) 2008-2013 Kris Maglione <maglione.k@gmail.com>
 //
 // This work is licensed for reuse under an MIT license. Details are
 // given in the LICENSE.txt file included with this file.
@@ -14,6 +14,9 @@ var StatusLine = Module("statusline", {
         this.statusBar = document.getElementById("addon-bar") || this._statusLine;
         this.baseGroup = this.statusBar == this._statusLine ? "StatusLine " : "";
 
+        if (config.haveGecko("25"))
+            config.tabbrowser.getStatusPanel().hidden = true;
+
         if (this.statusBar.localName == "toolbar") {
             styles.system.add("addon-bar", config.styleableChrome, literal(/*
                 #status-bar { margin-top: 0 !important; }
@@ -245,7 +248,7 @@ var StatusLine = Module("statusline", {
                 url = _("buffer.noName");
         }
         else {
-            url = url.replace(RegExp("^dactyl://help/(\\S+)#(.*)"), function (m, n1, n2) n1 + " " + decodeURIComponent(n2) + " " + _("buffer.help"))
+            url = url.replace(RegExp("^dactyl://help/(\\S+)#(.*)"), (m, n1, n2) => n1 + " " + decodeURIComponent(n2) + " " + _("buffer.help"))
                      .replace(RegExp("^dactyl://help/(\\S+)"), "$1 " + _("buffer.help"));
         }
 
@@ -330,7 +333,7 @@ var StatusLine = Module("statusline", {
     updateTabCount: function updateTabCount(delayed) {
         if (dactyl.has("tabs")) {
             if (delayed) {
-                this.timeout(function () this.updateTabCount(false), 0);
+                this.timeout(() => { this.updateTabCount(false); }, 0);
                 return;
             }
 
@@ -377,10 +380,7 @@ var StatusLine = Module("statusline", {
      * @param {number} percent The zoom level, as a percentage. @optional
      * @param {boolean} full True if full zoom is in operation. @optional
      */
-    updateZoomLevel: function updateZoomLevel(percent, full) {
-        if (arguments.length == 0)
-            [percent, full] = [buffer.zoomLevel, buffer.fullZoom];
-
+    updateZoomLevel: function updateZoomLevel(percent=buffer.zoomLevel, full=buffer.fullZoom) {
         if (percent == 100)
             this.widgets.zoomlevel.value = "";
         else {