Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to remove X button from chrome tabs?

Is there any way to modify chrome tabs to remove the button that closes the tab?

I've read through chrome develope tab. but I don't see any mention of the close button.

like image 346
Takkun Avatar asked Aug 09 '12 17:08

Takkun


People also ask

How do you close a tab with no X?

Press Ctrl + W (Windows) or ⌘ Command + W (Mac) on your computer's keyboard to close the tab you're currently using.

How do I remove a button from Chrome?

First, open the Chrome Browser on your Windows, Mac, or Linux computer. Next, right-click anywhere on the Bookmarks Bar or the “Apps” button itself. This will open a menu, from which you should unselect “Show Apps Shortcut.”

How do I remove the tab button?

Oops did you mistakenly close a tab you didn't want to? Press Ctrl + Shift + T to undo a closed tab. Pressing this key combination more than once brings back multiple closed tabs.


2 Answers

Not possible at the moment without forking the whole chromium project. See bug report #50913 (Status: WontFix).

Possible workarounds:

  1. If you right click on a tab you can Pin Tab. This will remove the close button but you can still close it with ctrl+w. Unfortunately, this will also remove the window title.
  2. The close button is removed if the width of the tab gets very small.

Have a look at the same question on SuperUser: How to disable the close (X) button on Google Chrome tabs?.

Maybe you like to look at the source code of Chromium and fix this? I think you have to start here: tab.cc.

like image 75
PiTheNumber Avatar answered Sep 27 '22 23:09

PiTheNumber


Edit: The fix below only worked between Chrome version 69 and 71.

It IS possible now for inactive tabs!

I have had lots of problems while trying to switch tab while having 10-15 of them opened, accidentally closing some important tab with lots of text typed which isn't recovered by Ctrl+Shift+T

Here how to do that:

1) Open the Google Chrome browser and type the following text into the address bar:

chrome://flags/#close-buttons-inactive-tabs 

This will open the flags page directly with the relevant setting.

2) Set the option named Close buttons on inactive tabs. Set it to Disabled using the drop down list next to the flag's name.

2

3) Restart Google Chrome by closing it manually or you can also use the Relaunch button which will appear at the very bottom of the page.

3

4) The close buttons will disappear from inactive tabs.

Before:

Before

After:

After

That's it!

Source - https://winaero.com/blog/remove-close-buttons-inactive-tabs-google-chrome/

like image 31
Handsome Jack Avatar answered Sep 27 '22 23:09

Handsome Jack