DEV Community

Here's how I made a simple Chrome Extension to close all open tabs

Midhun on January 15, 2022

Extensions are software programs, built on web technologies (such as HTML, CSS, and JavaScript) that enable users to customize the Chrome browsing ...
Collapse
 
ravavyr profile image
Ravavyr

I see the other comments with CTRL options and people going "great stuff for devs"...

You all do realize you can right-click on a tab in chrome and choose "Close other tabs" ?
While i'm on a roll, did you know you can create tab groups and color code them as well, so you can collapse em to manage your tabs better?
You can also right-click outside the tabs on the right side to "Reopen closed tab" which is very useful.

Still, it's neat article on how to create a chrome extension :) Kudos.

Collapse
 
fjones profile image
FJones

Since you mention Reopen closed tab, I'll throw in Ctrl+Shift+T ;)

Collapse
 
midhunz profile image
Midhun

:)

Collapse
 
midhunz profile image
Midhun

@ravavyr Thanks dude , Ctrl+Shift+Y was already implemented but not mentioned in the post. will think about what you mentioned

Collapse
 
fjones profile image
FJones

Or Ctrl/Cmd+T and right-click + close all other (which you can probably also map to a keybind, come to think of it...).

Workflow optimizations are neat, but sometimes I do wonder if it really warrants installing a dozen different extensions to fill your browser with extra buttons to do all sorts of tiny things (most of which tend to require using the mouse more, which I'm not sure actually makes the workflow all that faster...)

Collapse
 
midhunz profile image
Midhun • Edited

@fjones thanks for the ideas . problem you mentioned is 100% correct how to show dozens of extensions in browser. Currently added Ctrl+Shift+Y .. Surelly add mouse right click and close all

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

The process is damn-near identical for creating add-ons in other browsers. I wish people would mention that too, instead of giving the impression that this is only easily possible in Chrome

Collapse
 
midhunz profile image
Midhun

yes you are right jon , simple change it can work in firefox and edge

Collapse
 
midhunz profile image
Midhun

@lukeshiru thank you for your comments

Collapse
 
midhunz profile image
Midhun

Thanks

Collapse
 
jothinkumar profile image
Jothin kumar • Edited

Thanks for the useful article 👍.

Collapse
 
nirbhayparmar profile image
Nirbhay Parmar

You just targeted the pain point of many developers. Very excited to try this.