CleanTabs auto discards (sleep) / closes tabs in the background, based on customizable rules. Its goal is to reduce browser memory usage and address the clutter caused by having too many open tabs.
At every minute, CleanTabs will iterate over all tabs of all windows:
If
- not
Disabeld
tab.url
matches<URL Pattern>
CleanTabs will
- perform
<Action>
on this tab if leaving duration exceeds<Inactive minutes>
- process the next tab
Note
These tabs will not be discarded or closed:
- focused tab in every window
- pinned or grouped tabs if disabled in settings
- tabs excluded manually
A rule includes:
URL Pattern
Inactive minutes
Action
→Stash
Disabled
Examples:
*
: all urlshttps://www.google.com*
: all url that starts withhttps://www.google.com
*://*.google.com/*
:https://docs.google.com/
,http://mail.google.com/mail/u/0
Inactive = Now - <Last switch to this tab>
.
NOP
: Does nothing. Can be used to exclude some website.Discard
: Discards a tab from memory. Discarded tabs are still visible on the tab strip and are reloaded when activated. See Chrome Doc.Close
: Just close. If→Stash
enabled, this tab will be saved in Stash.
Tip
Copy these rules to Rules
-> Code mode
Discards or close the websites listed in the rules only, the others will not be touched.
*://www.google.com/*, 5, discard
*://stackoverflow.com/*, 10, close, true
chrome://newtab/, 1, close
about:blank, 1, close
By default, CleanTabs will discard / close any websites, except those marked as NOP
.
*://mail.google.com/*, 1, nop
*://www.youtube.com/*, 1, nop
*, 15, discard, true
Check WXT Extension FrameWork. PRs or issues are welcome!