Skip to content

Commit

Permalink
Add tabs counter to titlebar customization (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
KOLANICH authored and xabolcs committed Sep 26, 2014
1 parent f356a14 commit 2574f77
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions extension/chrome/content/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ get tabTitle() {
var tabbrowser = document.getElementById("content");
return tabbrowser.mCurrentBrowser.contentTitle;
},
get tabsCount() {
var tabbrowser = document.getElementById("content");
return tabbrowser.visibleTabs.length;
},

init: function()
{
Expand Down
1 change: 1 addition & 0 deletions extension/chrome/content/nightly.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ variables: {
get compiler() this.appInfo.XPCOMABI.split("-")[1],
get defaulttitle() { return nightlyApp.defaultTitle; },
get tabtitle() { return nightlyApp.tabTitle; },
get tabscount() {return nightlyApp.tabsCount; },
profile: null,
toolkit: "cairo",
flags: ""
Expand Down
2 changes: 1 addition & 1 deletion extension/chrome/content/titlebar/customize.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ init: function(aEvent)
paneTitle.addVariable("Compiler");
paneTitle.addVariable("Toolkit");
paneTitle.addVariable("Profile");

paneTitle.addVariable("TabsCount");
paneTitle.setupTree();
},

Expand Down

0 comments on commit 2574f77

Please sign in to comment.