[Pkg-mozext-commits] [tabmixplus] 04/13: Follow up bug 1359352 - Don't show »Connecting« and »Loading« labels in tab while loading pages

David Prévot taffit at moszumanska.debian.org
Sat Aug 5 15:28:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag 0.5.0.4pre.170525a1
in repository tabmixplus.

commit e4eb7646568d1dc9eb27dfd4cdd72054997e9dd4
Author: onemen <tabmix.onemen at gmail.com>
Date:   Wed May 24 07:33:02 2017 +0300

    Follow up bug 1359352 - Don't show »Connecting« and »Loading« labels in tab while loading pages
---
 chrome/content/minit/tablib.js    |  4 +++-
 chrome/content/session/session.js | 12 +++++++-----
 chrome/content/tab/tab.js         | 14 ++++++++------
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 2dc1d3c..8b52dd7 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -1773,9 +1773,11 @@ Tabmix.tablib = {
   get labels() {
     delete this.labels;
     this.labels = [
-      gBrowser.mStringBundle.getString("tabs.connecting"),
       gBrowser.mStringBundle.getString("tabs.emptyTabTitle"),
     ];
+    if (!Tabmix.isVersion(550)) {
+      this.labels.push(gBrowser.mStringBundle.getString("tabs.connecting"));
+    }
     return this.labels;
   },
 
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index 96cfed2..5945d6c 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -2689,11 +2689,13 @@ TabmixSessionManager = {
         }
       }
       var label = _tab.label;
-      // replace "Loading..." with the document title (with minimal side-effects)
-      let tabLoadingTitle = gBrowser.mStringBundle.getString("tabs.connecting");
-      if (label == tabLoadingTitle) {
-        gBrowser.setTabTitle(_tab);
-        [label, _tab.label] = [_tab.label, label];
+      if (!Tabmix.isVersion(550)) {
+        // replace "Loading..." with the document title (with minimal side-effects)
+        let tabLoadingTitle = gBrowser.mStringBundle.getString("tabs.connecting");
+        if (label == tabLoadingTitle) {
+          gBrowser.setTabTitle(_tab);
+          [label, _tab.label] = [_tab.label, label];
+        }
       }
       this.setLiteral(rdfNodeThisWindow, "name", encodeURI(label));
       this.setLiteral(rdfNodeThisWindow, "nameExt", this.getNameData(-1, savedTabs));
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 4fab3a8..0c258e1 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -2706,12 +2706,14 @@ TabmixProgressListener = {
     // check the current window.  if we're in a popup, don't init this progressListener
     if (window.document.documentElement.getAttribute("chromehidden"))
       return;
-    Tabmix.changeCode(gBrowser, "gBrowser.setTabTitleLoading")._replace(
-      'aTab.label = this.mStringBundle.getString("tabs.connecting");',
-      'if (TabmixTabbar.hideMode != 2 && TabmixTabbar.widthFitTitle && !aTab.hasAttribute("width"))' +
-      '  aTab.setAttribute("width", aTab.getBoundingClientRect().width);' +
-      '$&'
-    ).toCode();
+    if (!Tabmix.isVersion(550)) {
+      Tabmix.changeCode(gBrowser, "gBrowser.setTabTitleLoading")._replace(
+        'aTab.label = this.mStringBundle.getString("tabs.connecting");',
+        'if (TabmixTabbar.hideMode != 2 && TabmixTabbar.widthFitTitle && !aTab.hasAttribute("width"))' +
+        '  aTab.setAttribute("width", aTab.getBoundingClientRect().width);' +
+        '$&'
+      ).toCode();
+    }
     this.listener.mTabBrowser = tabBrowser;
     // Bug 1081891 fixed on Firefox 38
     if (!Tabmix.isVersion(340) || Tabmix.isVersion(380))

-- 
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