搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Hide Tab bar if there is only one tab

  • 5 回覆
  • 2 有這個問題
  • 2000 次檢視
  • 最近回覆由 giltheissen

more options

Hello!

I have been using this userChrome.css code to hide the tab bar if there is only one tab (on Windows):

tab:only-of-type, tab:only-of-type + #tabs-newtab-button {

   display: none !important;

}

#tabbrowser-tabs, #tabbrowser-arrowscrollbox, #tabbrowser-tabs > .tabbrowser-arrowscrollbox {
   min-height: 0 !important;

}

Since one of the recent Firefox updates, this code does no longer work. Maybe because there is a new element in the tab bar: A drop-down list at the right.

Any idea how to make the above code work again?

Peter

Hello! I have been using this userChrome.css code to hide the tab bar if there is only one tab (on Windows): tab:only-of-type, tab:only-of-type + #tabs-newtab-button { display: none !important; } #tabbrowser-tabs, #tabbrowser-arrowscrollbox, #tabbrowser-tabs > .tabbrowser-arrowscrollbox { min-height: 0 !important; } Since one of the recent Firefox updates, this code does no longer work. Maybe because there is a new element in the tab bar: A drop-down list at the right. Any idea how to make the above code work again? Peter

由 peter596 於 修改

被選擇的解決方法

Try this code in userChrome.css with the Firefox View button and the the "List all tabs" (Tab Manager) button hidden/removed.

tab[first-visible-tab=true][last-visible-tab=true],
tab[first-visible-tab=true][last-visible-tab=true] + #tabbrowser-arrowscrollbox-periphery{
  display:none!important;
}
#tabbrowser-tabs, #tabbrowser-arrowscrollbox {min-height: 0 !important;}

從原來的回覆中察看解決方案 👍 3

所有回覆 (5)

more options

You can set browser.tabs.tabmanager.enabled = false on the about:config page to hide the "List all tabs" (Tab Manager) button.

You can open the about:config page via the location/address bar. On the warning page, you can click "Accept the Risk and Continue"to open about:config.

Firefox 106+ has a "Firefox View" button at the left end of the Tab bar that you can remove via "Remove from Tab Bar" via the right-click context menu.

有幫助嗎?

more options

Thanks for the quick help! I have set browser.tabs.tabmanager.enabled = false, and indeed the dropdown button at the right has disappeared. But the + button at the left is still there, so the tab bar still does not disappear. It looks like this

tab:only-of-type, tab:only-of-type + #tabs-newtab-button {

  display: none !important;

}

does no longer work with the current Firefox version. Some change or replacement is needed for this code.

有幫助嗎?

more options

選擇的解決方法

Try this code in userChrome.css with the Firefox View button and the the "List all tabs" (Tab Manager) button hidden/removed.

tab[first-visible-tab=true][last-visible-tab=true],
tab[first-visible-tab=true][last-visible-tab=true] + #tabbrowser-arrowscrollbox-periphery{
  display:none!important;
}
#tabbrowser-tabs, #tabbrowser-arrowscrollbox {min-height: 0 !important;}

有幫助嗎?

more options

This works. Thanks a lot!

有幫助嗎?

more options

I had the same problem with FF106 and cor-el's solution worked for me as well. Many thanks.

有幫助嗎?

問個問題

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題