[Pkg-mozext-commits] [tabmixplus] 11/13: After bug 1364127 about:blank tabs label is its url instead of 'New Tab'
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 80da1535b88676be1e9c1c9e454e08ea66b65e69
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed May 24 21:57:10 2017 +0300
After bug 1364127 about:blank tabs label is its url instead of 'New Tab'
---
chrome/content/minit/tablib.js | 6 ++++++
chrome/content/session/sessionStore.js | 6 +++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index be09ad4..2eb09f9 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -361,6 +361,12 @@ Tabmix.tablib = {
if (Tabmix.isVersion(550)) {
Tabmix.changeCode(gBrowser, "gBrowser._setTabLabel")._replace(
+ '{',
+ `{
+ if (aLabel == TabmixSvc.aboutBlank) {
+ aLabel = this.mStringBundle.getString("tabs.emptyTabTitle");
+ }`
+ )._replace(
'this._tabAttrModified',
`let urlTitle = aOptions && aOptions.urlTitle;
Tabmix.tablib.onTabTitleChanged(aTab, aTab.linkedBrowser, aLabel == urlTitle);
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index f044a3b..ed9b892 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -37,7 +37,11 @@ var TMP_SessionStore = {
getTitleFromTabState(aTab) {
let tabData = TabmixSvc.JSON.parse(TabmixSvc.ss.getTabState(aTab));
- return this.getActiveEntryData(tabData).title || null;
+ let data = this.getActiveEntryData(tabData);
+ if (data.url == TabmixSvc.aboutBlank) {
+ return gBrowser.mStringBundle.getString("tabs.emptyTabTitle");
+ }
+ return data.title || null;
},
// check if pending tab has no history or is about:blank
--
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