Any way to remove X button from chrome tabs?

Google Chrome-Extension

Google Chrome-Extension Problem Overview


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.

Google Chrome-Extension Solutions


Solution 1 - Google Chrome-Extension

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.

Solution 2 - Google Chrome-Extension

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.

  1. 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

  1. 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

  1. 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/

Solution 3 - Google Chrome-Extension

There are now Chromium-based alternative browsers which offer this - I really like Vivaldi, where not showing the X button is just one of many customization options. Also, because it is Chromium based you can install and use any Chrome extensions. It is perfect if you have many tabs open and need more of the power-user type options.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTakkunView Question on Stackoverflow
Solution 1 - Google Chrome-ExtensionPiTheNumberView Answer on Stackoverflow
Solution 2 - Google Chrome-ExtensionHandsome JackView Answer on Stackoverflow
Solution 3 - Google Chrome-ExtensioniquitoView Answer on Stackoverflow