Tab Tamer

By Steph19
Scroll to open

Tab Tamer

I had 90 tabs open and no intention of reading any of them. So I built the thing that closes them for you and tells you what you lost. Two evenings, one weekend morning, and it has been running ever since without me touching it.

Gallery image 1
Gallery image 2
Gallery image 3
javascript
const stale = tabs.filter(t => now - t.lastAccessed > WEEK)
const grouped = Object.groupBy(stale, t => new URL(t.url).hostname)
await archive.write(grouped)
await Promise.all(stale.map(t => browser.tabs.remove(t.id)))

What should it learn to do next?

Log in to vote