26

I'd like to hide the tab bar when there's only one tab opening. Because I open 4 windows so 4 tab bar actually takes quite a lot screen real estate.

I use Google Chrome the Linux version.

4 Answers 4

43

Here's a piece of javascript you can put into your browser's omnibox or into a bookmark:

javascript:window.open(location.href, "detab", "toolbar=0"); window.close()

This will open a new window with your current page without tabs and close the current page.

5
  • +1 Thanks! I'm surprised no one has upvoted this yet.
    – Frank
    Commented Oct 12, 2013 at 5:33
  • 3
    For this to work for me (window is not closing but other window is opening) on Chrome 42 on OS X 10.11, I need to make sure "javascript:" is on the front and "window.close()" has a trailing semicolon. Commented Dec 15, 2015 at 23:35
  • window.close() doesn't work on Chromium 97. It fails with the error message: Scripts may close only the windows that were opened by them. You can still use the first command to open a new window without tab bar and then close the old one manually.
    – Saftius
    Commented Feb 3, 2022 at 6:36
  • on Ubuntu you get the system bar, so you don't gain any space
    – daslicious
    Commented Mar 24, 2022 at 19:53
  • 2022 - This solution no longer seems to "detab" the chrome instance. Commented Nov 16, 2022 at 22:42
19

To make the javascript snippet from @drnessie's answer easily accessible, do the following:

  1. right-click on the omnibar and select "Edit Search Engines"
  2. Add a new entry under "Other Search Engines" with the following fields:
    • Name: Hide tab bar
    • Keyword: ht
    • URL: javascript:window.open(location.href, "detab", "toolbar=0"); window.close()
  3. To open the current tab in a new window without tab bar simply hit Ctrl-L to focus the ominbar, type ht and hit Return
2
  • 1
    For this to work for me (window is not closing but other window is opening) on Chrome 42 on OS X 10.11, I need to make sure "javascript:" is on the front and "window.close()" has a trailing semicolon. Commented Dec 15, 2015 at 23:35
  • Actually, now I can't get this search engine hack to work. No matter the differences I mentioned in my last comment, I cannot get the original tab to close after opening the new window. Commented Dec 16, 2015 at 16:23
1

This is how I hide all tabs and an address bar: press full screen (F11) then press toggle fullscreen (Super + F), that's it. It's OS specific feature ( works on Elementary 5.1 )

1
  • Can confirm this worked with Awesome window manager on linux.
    – ttb
    Commented May 19, 2021 at 17:27
0

I am not entirely certain that this will work on the Linux version of Google Chrome, but I know for the version on Windows, this might solve your problem...

http://www.ehow.com/how_11415464_hide-tabs-chrome.html

If I am understanding you correctly, you would like to essentially get rid of the tabs on Google Chrome and since you seem to be concerned about screen real estate, it makes me think that making Google Chrome full screen will help. F11 will make it full screen (again, this is how you at least do this in Windows)

If I am misinterpretting your question, please correct me so I can try to give you the correct answer.

2
  • Works for me in Fedora 17. Commented Mar 14, 2013 at 17:46
  • F11 is the fullscreen key on Linux, but the question asks how to hide the tab bar on four windows - fullscreening one window, while hiding its tab bar, will hide the other three windows.
    – Saftius
    Commented Feb 3, 2022 at 6:34

You must log in to answer this question.

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