Close current tab via red sidebar click #909
TS6ix2GaH3q679h5
started this conversation in
Userscripts
Replies: 1 comment 2 replies
-
If you just want to close the current tab, why not just use Also, I edited the post a little for you to make it easier to read. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a userscript inspired by a Chrome extension I liked called close_tab(s)
That extension closes the current tab when you click on a floating red bar that gets revealed when hovering the mouse at the edge of the screen. This is nice faster way to browse pages and quickly close them using just a mouse, without having to hunt for that tiny little X in the tab bar to click on.
This userscript is more simple: it paints a small dark red bar along the left edge of each page. Click anywhere in it to close the tab. It adjusts for proper sizing to have minimal impact on the page content but there may be some pages/sites where it just plain doesn’t work well, so I add those as exclusions.
This makes use of the
GM.closeTabpermission thatUserscriptssupports, which makes it a little different from a userscript that could work in Tampermonkey on Chrome or etc. So for that reason I’m pasting it here.I’m sure there are various modifications that could be made to this, but this is a simple version that has been working for me for a few years now. If anyone else can find it useful I’d be happy.
Beta Was this translation helpful? Give feedback.
All reactions