Skip to content

hansifer/close-tab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A browser extension that adds a tab close action to the page context menu

Available for Chrome

The menu item shortcut key is customizable in case the default c collides with an existing menu item.

Why is this useful?

Close Tab lets you close a web page with a right mouse click anywhere on the page followed by a key press. This is often quicker than moving the mouse cursor up to and clicking the tab's close icon or taking your hand off the mouse to use a keyboard shortcut that requires both hands.

 

macOS limitations

Close Tab has limited usefulness in macOS because macOS does not have customizable accelerator keys for menu items. The first letter of a menu item's title always serves as its accelerator key. Additionally, typing the first letter of a menu item only selects it; a subsequent Enter key press is required to activate it.

It's for these reasons that a Safari port of Close Tab doesn't exist and Close Tab's options UI doesn't show the menu item shortcut key selector on macOS.

Tech notes

The technical simplicity of this extension allows it to be a vanilla JS implementation with native CSS and direct DOM calls. A benefit of this is the absence of a dev-time build step and dependencies (with the exception of chrome types).

Releases

No releases published

Packages

No packages published