Skip to content

A browser extension that auto discard (sleep) / close tabs based on rules.

License

Notifications You must be signed in to change notification settings

heyppen/CleanTabs

Repository files navigation

Logo

CleanTabs

A browser extension that auto discard / close tabs based on customizable rules.

Chrome Web Store Version Discord invite link Discord invite link

shot-rules.png

CleanTabs

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.

Installation

Chrome Web Store Badge

How CleanTabs works?

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

Rule

A rule includes:

  • URL Pattern
  • Inactive minutes
  • Action
  • →Stash
  • Disabled

URL Pattern

Examples:

  • *: all urls
  • https://www.google.com*: all url that starts with https://www.google.com
  • *://*.google.com/*: https://docs.google.com/, http://mail.google.com/mail/u/0

Inactive minutes

Inactive = Now - <Last switch to this tab>.

Action

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

Recommended rules

Tip

Copy these rules to Rules -> Code mode

Gentle 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

Aggressive mode

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

Development

Check WXT Extension FrameWork. PRs or issues are welcome!

About

A browser extension that auto discard (sleep) / close tabs based on rules.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published