23

How can I make Firefox show the bookmarks toolbar only on new tabs, like Chrome does by default?

Note: his is not the same as Showing bookmarks in new tab in firefox, I'd like to show the bookmarks toolbar only on new tabs, and that question is about showing bookmarks as tiles.

I'm running Firefox 57.x (aka Quantum)

5 Answers 5

6

With Firefox 84 (I'm on beta / dev edition), there is an option to do this; If you don't see it:

  1. Go to about:config and toggle browser.toolbars.bookmarks.2h2020 to True.
  2. You may need to restart your browser
  3. Afterwards, you can find the option in your menu bar:

enter image description here

2
  • 4
    I am on Firefox 84 on Linux. The option appears as described, but does not work (Bookmark Toolbar is always hidden) for my New tabs (Blank Page). It works only if under Home > New Windows and Tabs > New tabs the "Firefox Home (Default)" is selected. I now use Ctrl+Shift+B to show/hide the toolbar explicitly via keyboard.
    – geekQ
    Jan 4, 2021 at 8:53
  • @geekQ I use Tabliss for new tabs, I can't seem to reproduce your problem.
    – Amith
    Jan 4, 2021 at 16:22
12

It's a bit of a workaround, but you can do this by creating a custom userChrome.css rule. This works by leaving the bookmarks toolbar enabled all the time, and hiding it unless the tab title matches the title of your New Tab. This should work in versions of firefox 57 and up (through at least the current beta, 63).

Here is the kb article about userChrome. I cobbled this solution from several sources, including this reddit thread. To summarize (for Windows because that's what I'm on):

  1. Enable the bookmarks toolbar permanently.
  2. Go to your firefox profile in your file browser. On Windows this is %userprofile%\AppData\Roaming \Mozilla\Firefox\Profiles\[random-id].default\.
    • Note: There can be multiple profiles, you may be able to distinguish yours by inspecting the contents of the profile, for example under the extensions directory.
  3. Under your firefox profile, create a new folder named chrome. It should be something like \...\Profiles\[random-id].default\chrome\
    • Note: "chrome" here means "user interface" and doesn't have anything to do with the Chrome browser.
  4. In that new folder, create a plain text file named userChrome.css
  5. Open a new tab and note down the title exactly. It will probably be just Firefox. Mine says Firefox Developer Edition because I'm on the dev channel.
  6. Copy the below css rule into this plain file with a text editor like notepad. Then edit the quoted title to match the title of your new tab.
  7. Save the file and restart Firefox.

Here is the css rule:

/* show bookmarks toolbar on new tab only */
#main-window:not([title^="Firefox Developer Edition"]) #PersonalToolbar {
  visibility:collapse !important;
}

This works ok, but there are some drawbacks:

  • Since the toolbar is already always 'present' but hidden, this means you can only access the bookmarks toolbar from a new tab. It becomes impossible to access from another page. This is an acceptable tradeoff for me.
  • If you are always using sidebars or sidebar-based extensions like Tree Style Tabs, the sidebar will always show below the toolbar, meaning that when you open a new tab the sidebar will temporarily shift down until you navigate away. This doesn't really affect usability besides looking a little janky.
2
  • You can open the profile folder location from "Help > Troubleshooting Information" in the menu, wherever it is located.
    – Daddy32
    Oct 21, 2019 at 10:19
  • None of the CSS changes in this thread worked did work for me...
    – Daddy32
    Oct 21, 2019 at 10:19
7

The answers in this thread no longer work with Firefox 72, since this version of Firefox changed how tab titles are stored. Here's the latest solution, keep in mind that it's a tad bit of a workaround:

  1. Follow this guide to enable userChrome.css, a file used to modify [Firefox] using CSS instructions.
  2. Follow steps 1 through 4 in this answer, then open up the userChrome.css you created in a text editor.
  3. Paste the following snippet of code (from this source) into the file, then save:
#nav-bar:not(:focus-within) + #PersonalToolbar:not(:hover):not(:focus-within):not([customizing]) { visibility: collapse; }
  1. Restart Firefox. Whenever you click inside of the URL bar (which happens automatically when you create a new tab), the bookmarks toolbar should appear.
5
  • Not working for me :( I already had the previously-working solution in place, with toolkit.legacyUserProfileCustomizations.stylesheets enabled and the userChrome.css file in place. I added your snippet to it, restartet Firefox, but the Bookmarks Toolbar is constantly hidden. Jan 27, 2020 at 14:26
  • Hi @DanielSerodio! Make sure these two things are true: 1) You're using the latest version of Firefox (Firefox 72). You can check that here. 2) You've deleted the code from the original Answer, and replaced it with the code from the above Answer. If both snippets of code are in userChrome.css, the Bookmarks Toolbar will be constantly hidden, as you reported. Jan 29, 2020 at 2:47
  • 1
    Thanks Zachary, I had not deleted the code from the original Answer. It's working fine now Feb 6, 2020 at 16:14
  • @DanielSerodio Glad to hear :) Feb 6, 2020 at 17:00
  • 1
    Thanks, still works for Firefox 76
    – darkend
    May 8, 2020 at 9:18
1

For linux 18:


Go to about:config in firefox new tab

Turn on toolkit.legacyUserProfileCustomizations.stylesheets

Then go to ~/.mozilla/firefox/1sbqh1j5.default/

cd ~/.mozilla/firefox/


cd to xxxx.default folder in it

Create folder named chrome

mkdir chrome

Create file named userChrome.css in it

touch userChrome.css


Open it in vim, nano, or any code editor

vi userChrome.sss

add the following code:


/*
 * Bookmarks toolbar is visible only on new tab page, just like Chrome.
 *
 * Screenshot: https://vimeo.com/235059188
 * Video: https://vimeo.com/240436456
 *
 * Contributor(s): https://www.reddit.com/user/AJtfM7zT4tJdaZsm and Andrei Cristian Petcu
 *                 https://www.reddit.com/r/FirefoxCSS/comments/7evwow/show_bookmarks_toolbar_only_on_new_tab/
 */

 #main-window #PersonalToolbar {
    visibility: collapse !important;
  }

  #main-window[title^="about:newtab"] #PersonalToolbar,
  #main-window[title^="New Tab"] #PersonalToolbar,
  #main-window[title^="Nightly"] #PersonalToolbar,
  #main-window[title^="Mozilla Firefox"] #PersonalToolbar,
  #main-window[title^="Firefox"] #PersonalToolbar,
  #main-window[title^="新标签页"] #PersonalToolbar,
  #main-window[title^="Customize Firefox"] #PersonalToolbar {
    visibility: visible !important;
  }

Restart browser

1

For those who have the same problem on Firefox 85.1;

Solution 1:

  1. Write "about:config" to address bar. Click on "Accept the Risk And Continue".
  2. Write "browser.toolbars.bookmarks.2h2020" on the search bar and make it "true".
  3. Go to Firefox "Customize" page. At the bottom of the page click on the "Toolbars" > "Bookmarks Toolbar" > "Only Show on New Tab"

Solution 2:

  1. Write "about:config" to address bar. Click on "Accept the Risk And Continue".
  2. Write "browser.toolbars.bookmarks.visibility" on the search bar and select "newtab".
1
  • that worked until I have shown and hide toolbar.
    – rofrol
    Jan 18 at 21:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .