auto-tab-discard icon indicating copy to clipboard operation
auto-tab-discard copied to clipboard

Enhancement: Support configurable regexes for automatic closing/removal/trashing of discarded tabs

Open tonycpsu opened this issue 2 years ago • 2 comments

It would be useful if the "Permanently delete (remove) old discarded tabs if they are inactive for (in hours)" option supported a list of regex rules, similar to the "Only discard the following inactive hostnames or regular expression rules1" configuration, where discarded tabs are only trashed if the configured time has elapsed and the URLs match a user-supplied list.

The use case is for situations where you have certain sites that you open tabs for but those tabs become less relevant over time and you're okay with them being closed for you.

A supercharged version of this feature could allow for the regexes to each have a number of seconds for them, so you could say site A tabs automatically disappear after 7 days, site B's tabs disappear after 30 days, etc.

I'd be happy to take a stab at this if you'd accept a PR.

tonycpsu avatar Dec 16 '21 18:12 tonycpsu

I'd be happy to take a stab at this if you'd accept a PR.

Sure! You just need to update the "trash" plugin; https://github.com/rNeomy/auto-tab-discard/tree/master/plugins/trash Have a filter for keys and remove the keys that are not supposed to be checked.

A supercharged version of this feature could allow for the regexes to each have a number of seconds for them

The trash check fires every half an hour, so it is technically possible to use the default value or the one that is part of the user request. We can have domain@24h or re:...@24h format to support the custom period.

rNeomy avatar Dec 18 '21 11:12 rNeomy

It'd be useful if this let us close/discard other extension pages as well - example chrome-extension://edacconmaakjimmfgnblocblbcdcpbko/main.html

AJolly avatar Dec 27 '21 03:12 AJolly