[Pkg-mozext-commits] [tabmixplus] 09/34: Follow up bug 446171 - Part 1: Get page titles from tab and not depend on history, we don't need to call getTabTitle now that Firefox get the title directly from the tab

David Prévot taffit at moszumanska.debian.org
Mon Jun 27 13:57:56 UTC 2016


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit 0ba050b54885adaf522f7480665e44873579a5a3
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sat Jun 18 13:43:11 2016 +0300

    Follow up bug 446171 - Part 1: Get page titles from tab and not depend on history, we don't need to call getTabTitle now that Firefox get the title directly from the tab
---
 chrome.manifest                 |  5 +++--
 chrome/content/places/places.js | 22 ++++++++++++----------
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/chrome.manifest b/chrome.manifest
index ed20842..392a934 100644
--- a/chrome.manifest
+++ b/chrome.manifest
@@ -56,8 +56,9 @@ overlay   chrome://mozapps/content/handling/dialog.xul              chrome://tab
 overlay   chrome://browser/content/bookmarks/bookmarksPanel.xul     chrome://tabmixplus/content/places/places.xul
 overlay   chrome://browser/content/history/history-panel.xul        chrome://tabmixplus/content/places/places.xul
 overlay   chrome://browser/content/places/places.xul                chrome://tabmixplus/content/places/places.xul
-overlay   chrome://browser/content/places/bookmarkProperties.xul    chrome://tabmixplus/content/places/bookmarkProperties.xul
-overlay   chrome://browser/content/places/bookmarkProperties2.xul   chrome://tabmixplus/content/places/bookmarkProperties.xul
+# bookmarkProperties.xul is not in use since Firefox 49 (bug 446171)
+overlay   chrome://browser/content/places/bookmarkProperties.xul    chrome://tabmixplus/content/places/bookmarkProperties.xul appversion<=48.0
+overlay   chrome://browser/content/places/bookmarkProperties2.xul   chrome://tabmixplus/content/places/bookmarkProperties.xul appversion<=48.0
 
 overlay   chrome://browser/content/preferences/sanitize.xul         chrome://tabmixplus/content/preferences/overlay/overlaySanitizeUI.xul
 overlay   chrome://browser/content/sanitize.xul                     chrome://tabmixplus/content/preferences/overlay/overlaySanitizeUI.xul
diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index e454158..8bfc4b9 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -60,16 +60,18 @@ var TMP_Places = {
         ).toCode();
       }
 
-      let $LF = '\n        ';
-      Tabmix.changeCode(PlacesCommandHook, "uniqueCurrentPages", {getter: true})._replace(
-        'URIs.push(tab.linkedBrowser.currentURI);',
-        'if (Tabmix.callerTrace("PCH_updateBookmarkAllTabsCommand")) {' + $LF +
-        '  $&' + $LF +
-        '} else {' + $LF +
-        '  let uri = tab.linkedBrowser.currentURI;' + $LF +
-        '  URIs.push({uri: uri, title: TMP_Places.getTabTitle(tab, uri.spec)});' + $LF +
-        '}'
-      ).defineProperty();
+      if (!Tabmix.isVersion(490)) {
+        let $LF = '\n        ';
+        Tabmix.changeCode(PlacesCommandHook, "uniqueCurrentPages", {getter: true})._replace(
+          'URIs.push(tab.linkedBrowser.currentURI);',
+          'if (Tabmix.callerTrace("PCH_updateBookmarkAllTabsCommand")) {' + $LF +
+          '  $&' + $LF +
+          '} else {' + $LF +
+          '  let uri = tab.linkedBrowser.currentURI;' + $LF +
+          '  URIs.push({uri: uri, title: TMP_Places.getTabTitle(tab, uri.spec)});' + $LF +
+          '}'
+        ).defineProperty();
+      }
     }
 
     // prevent error when closing window with sidebar open

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