Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tabs count as template variable for titlebar customization #171

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a new issue filed to get all of those variables sorted alphabetically?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a new issue filed to get all of those variables sorted alphabetically?

Filed Issue #172.

paneTitle.setupTree();
},

Expand Down