Remove Tab When Viewing Only One Page
- rusty09
- Posts: 57
- Joined: January 10th, 2009, 4:44 pm
Remove Tab When Viewing Only One Page
There used to be an addon for this, but since the newest FF release, the addon no longer works. So, does anyone know how to remove the tab when viewing a single web page?
The tab takes up valuable page space, and is not necessary when only one web page is open.
The tab takes up valuable page space, and is not necessary when only one web page is open.
-
- Posts: 4480
- Joined: March 19th, 2005, 10:51 am
Re: Remove Tab When Viewing Only One Page
not possible for now - and not for v59.
- rusty09
- Posts: 57
- Joined: January 10th, 2009, 4:44 pm
Re: Remove Tab When Viewing Only One Page
Any chance that Mozilla will consider this?
In addition, the newer FF does not support toolbars, such as Roboform, either.
In addition, the newer FF does not support toolbars, such as Roboform, either.
-
- Posts: 104
- Joined: July 29th, 2012, 2:25 pm
Re: Remove Tab When Viewing Only One Page
Well, actually it can be hidden with the following addition to userchrome.css
#TabsToolbar { visibility: collapse; }
But....you cannot open in a new tab or switch between tabs after the change,
except for using the down arrow in the url bar to switch from one tab to another,
however I have not found a way to close a tab without closing FF.
Everything must be opened in a NEW WINDOW.
It gets rid of the ugly dead wasted space, but at a price.
Richard
#TabsToolbar { visibility: collapse; }
But....you cannot open in a new tab or switch between tabs after the change,
except for using the down arrow in the url bar to switch from one tab to another,
however I have not found a way to close a tab without closing FF.
Everything must be opened in a NEW WINDOW.
It gets rid of the ugly dead wasted space, but at a price.
Richard
- Gingerbread Man
- Posts: 7735
- Joined: January 30th, 2007, 10:55 am
Re: Remove Tab When Viewing Only One Page
Well, sort of. If you have the title bar displayed, then I have it working reasonably well with a tab counter add-on and userChrome.css.rusty09 wrote:So, does anyone know how to remove the tab when viewing a single web page?
The problem crops up when you have the title bar hidden (default setting): the window controls plop down onto navigation toolbar, obscuring the buttons there. I could scooch the buttons over to the left to make room for the window controls, but then you have a blank space permanently there when you have more than one tab open. I see no way to address that.
You could try asking the authors of these add-ons to add the tab count as an attribute to #main-window (Tab Tally, Tab Counter, Tab counter, Yet Another Tab Counter). I don't know if that's actually possible in a webextension, but it would solve the issue if it is. Otherwise, we'd need the subject selector (bug 418039), and that's likely still years away.
Anyway, if you want to try this:
- Yet Another Tab Counter.
- Right-click the right side of the navigation toolbar, then choose Customize. Drag the Yet Another Tab Counter icon over to the left, so that it precedes the first tab.
- Add the following to your userChrome.css and remember to restart Firefox.
Code: Select all
/* Author: Gingerbread Man Hide the tab bar when only one tab is open. Requires an add-on like Yet Another Tab Counter and the title bar being enabled. */ #main-window:not([customizing="true"]) toolbarbutton[label="Yet Another Tab Counter"][badge="1"] + #tabbrowser-tabs, #main-window:not([customizing="true"]) toolbarbutton[label="Yet Another Tab Counter"][badge="0"] + #tabbrowser-tabs, #main-window:not([customizing="true"]) toolbarbutton[label="Yet Another Tab Counter"] { visibility: collapse !important; }
I'm inclined to say no, because it was a feature at one point and now it's gone. Then again, this latest version moved the Reload button back the way it was ages ago, so who knows?rusty09 wrote:Any chance that Mozilla will consider this?
Last edited by Gingerbread Man on November 17th, 2017, 11:53 am, edited 1 time in total.
-
- Posts: 104
- Joined: July 29th, 2012, 2:25 pm
Re: Remove Tab When Viewing Only One Page
That works great...I don't suppose there is a way to keep it from showing a tab
when I have more than one window open. Seems it counts open windows and tabs
as the same thing...so then it goes back to displaying a tab.
Not a deal breaker either way. I like it and am using the suggested work around.
Richard
when I have more than one window open. Seems it counts open windows and tabs
as the same thing...so then it goes back to displaying a tab.
Not a deal breaker either way. I like it and am using the suggested work around.
Richard
- Gingerbread Man
- Posts: 7735
- Joined: January 30th, 2007, 10:55 am
Re: Remove Tab When Viewing Only One Page
Oh. Back to the drawing board! Replace Tab Tally with Yet Another Tab Counter, once again placing it before the first tab. Also replace the CSS code you have with the one in the edited post above.Richard1296 wrote:That works great...I don't suppose there is a way to keep it from showing a tab
when I have more than one window open.
-
- Posts: 104
- Joined: July 29th, 2012, 2:25 pm
Re: Remove Tab When Viewing Only One Page
WOW....Thank You Gingerbread Man...absolutely perfect. I don't see the little
icon that represents the number of open tabs , dunno if I lost it
or that's how it is supposed to be but I am not messing with anything...it works great.
Now one last request since you were so prompt with my last one.
Can you provide some winning lottery numbers.
Thanks
Richard
icon that represents the number of open tabs , dunno if I lost it
or that's how it is supposed to be but I am not messing with anything...it works great.
Now one last request since you were so prompt with my last one.
Can you provide some winning lottery numbers.
Thanks
Richard
- Gingerbread Man
- Posts: 7735
- Joined: January 30th, 2007, 10:55 am
Re: Remove Tab When Viewing Only One Page
The above style hides it, except when in Customize mode. Since the add-on was only needed to hide the tab bar, I assumed you wouldn't want the counter icon there. If you actually do, delete this bit, starting with the last ,Richard1296 wrote:I don't see the little icon that represents the number of open tabs , dunno if I lost it or that's how it is supposed to be
Code: Select all
,
#main-window:not([customizing="true"]) toolbarbutton[label="Yet Another Tab Counter"]
Richard1296 wrote:Now one last request since you were so prompt with my last one.
Can you provide some winning lottery numbers.
You're welcome.
———
Someone figured out a way to do without an add-on. Here is that style, with some tiny tweaks. As before, the title bar must be enabled for it to work. Additionally, the New Tab button and add-on buttons are hidden when you're not hovering the mouse cursor over the the tab bar.
Code: Select all
/*
Hide the tab bar when only one tab is open
https://www.reddit.com/r/FirefoxCSS/comments/7dqtuf/hide_tab_bar_if_only_one_tab_is_open/
*/
#tabbrowser-tabs,
#tabbrowser-tabs > .tabbrowser-arrowscrollbox,
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] {
min-height: initial !important;
}
.tabbrowser-tab {
line-height: 32px !important;
height: 32px !important;
}
.tabbrowser-tab:only-of-type,
.tabs-newtab-button,
#tabbrowser-tabs ~ .toolbarbutton-1 {
display: none !important;
}
#tabbrowser-tabs:hover .tabs-newtab-button,
#tabbrowser-tabs:hover ~ .toolbarbutton-1 {
display: -moz-box !important;
}
-
- Posts: 15
- Joined: October 4th, 2014, 6:53 am
Re: Remove Tab When Viewing Only One Page
What's the practical difference between the original version from Reddit, and your tweaked version? I'm using the one from Reddit right now and it seems to work perfectly so far.
Before that, I tried the addon-based one you posted and it had a lot of quirks - most of the time it worked fine, but sometimes it wouldn't show or hide in the right situations. Probably the fault of the addon I guess.
Thanks for posting this stuff.
Before that, I tried the addon-based one you posted and it had a lot of quirks - most of the time it worked fine, but sometimes it wouldn't show or hide in the right situations. Probably the fault of the addon I guess.
Thanks for posting this stuff.
- Gingerbread Man
- Posts: 7735
- Joined: January 30th, 2007, 10:55 am
Re: Remove Tab When Viewing Only One Page
The only noteworthy change is that my tweak makes it work when there are add-on buttons on the tab bar (like the New Tab button, they only show on hover). Other than that, it's just minor code cleanup that you won't care about if you don't understand CSS.brf wrote:What's the practical difference between the original version from Reddit, and your tweaked version?
If you don't mind the New Tab button (and any add-on buttons on the tab bar) showing only on hover, then don't bother with the style I cobbled together in the beginning.brf wrote:Before that, I tried the addon-based one you posted and it had a lot of quirks - most of the time it worked fine, but sometimes it wouldn't show or hide in the right situations.
-
- Posts: 15
- Joined: October 4th, 2014, 6:53 am
Re: Remove Tab When Viewing Only One Page
Ah, I don't normally use any addon buttons on the tab bar, so wouldn't have noticed that difference. Thanks.
-
- Posts: 1
- Joined: December 5th, 2017, 8:22 am
Re: Remove Tab When Viewing Only One Page
Your code works great, including hiding the new tab button. One thing I noticed though is that it does not hide the private browsing icon. When I open a private window, the tab bar is there containing only the private browsing icon on the right. Is there any way to make it hide the tab bar with this icon as well?