Skip to content

projekta2/tabcost-pro-source

Repository files navigation

Animated tagline


GitHub stars

⭐ If TabCost helps you stay focused, please star this repo — it takes one second and means a lot.


     

Open issues   Stars   Manifest validation



🧠 What is TabCost Pro?


Every freelancer and remote worker has felt it. You open a new tab. Then another. By the time you look up, Twitter, YouTube, and three Amazon searches have been sitting there for 40 minutes. You were "working" the whole time — but were you?

TabCost makes the invisible cost of that distraction impossible to ignore.


TabCost Pro calculates the opportunity cost of your idle browser tabs in real time. Based on your hourly rate, each inactive tab accumulates a small cost per minute after a configurable grace period. It's a metaphor for your attention — not a real invoice.

Open the popup and you see one number: how much your idle tabs have cost you today. That number changes behaviour.


  YOUR RATE: $75/h   ·   IMPACT: 20%   ·   GRACE PERIOD: 5 min
  ────────────────────────────────────────────────────────────────

  Twitter (idle 47 min)   →  $0.47 lost
  YouTube (idle 82 min)   →  $0.82 lost
  Amazon  (idle 29 min)   →  $0.29 lost
  ────────────────────────────────────────
  Total today             →  $2.13 and climbing


✨ Features


💸  Live opportunity cost

A single number in the popup — updated every minute — showing exactly how much your idle tabs have cost you today. Calculated from your hourly rate × idle time × impact factor.

Animated counter · USD / EUR · adjustable impact (Pro)

🗑️  Close all inactive tabs

One button closes every tab past the grace period. Instant focus reset. The active tab stays open. Free for all users — no Pro license needed.

Grace period: 5 min fixed (Free) · 1–30 min configurable (Pro)

📈  365-day history chart PRO

Daily loss history visualised as a bar chart directly in the control panel. See your worst distraction days at a glance. Export the full dataset to CSV.

Up to 365 days · bar chart · CSV export

🚫  Domain whitelist PRO

Add your work tools — Notion, Figma, GitHub, Gmail — so those tabs never count. Only genuinely idle, non-work tabs accumulate cost.

Per-domain rules · subdomain matching

🤖  Auto-close idle tabs PRO

Set a threshold (e.g. 30 min) and TabCost closes idle tabs automatically in the background — keeping your browser lean without lifting a finger.

0 = off · 5–120 min configurable

🔔  Push notifications PRO

A browser notification fires when your daily cost crosses your threshold (default $2.50). A jolt of context exactly when you need it most.

Configurable threshold · one notification per day

🔍  Critical tab audit

Full table of every idle tab ranked by cost — title, inactive time, dollar amount. Available in both the popup and the control panel.

Ranked by cost · sortable · live data

🌍  Bilingual — EN / ES

Every string is in both English and Spanish. Switch at any time via the toggle. Preference saved locally. No restart needed.

Free for all users


💰 Pricing


Feature Free Pro
Live opportunity cost display
Close all inactive tabs
Critical tab audit
Bilingual UI (EN / ES)
Dark / Light mode
Grace period: 5 min fixed
Grace period: 1–30 min configurable
365-day history chart
CSV export
Domain whitelist
Auto-close idle tabs

| Custom impact factor (10–50%) | ❌ | ✅ | | Daily cost reset | ❌ | ✅ | | Push notifications | ❌ | ✅ | | Price | Free forever | $5 / €5 — one-time |


One-time payment · Lifetime license · Verified via Gumroad · Activates in seconds



🔧 Install from source (for developers)


git clone https://github.com/projekta2/tabcost-pro-source.git
cd tabcost-pro-source
  1. Open chrome://extensions in Chrome
  2. Enable Developer mode (toggle, top right)
  3. Click Load unpacked and select the cloned folder
  4. The TabCost icon appears in your toolbar — click it and set your hourly rate

No build step. No bundler. No dependencies to install. Pure ES2022 vanilla JS + MV3.


 



🗂️ Repository structure


tabcost-pro-source/
├── manifest.json          MV3 manifest — permissions, icons, service worker
├── background.js          Service worker: cost calculation, alarms, tab tracking,
│                          license verification, midnight rotation, notifications
├── popup.html             Extension popup — 340px, dark/light, bilingual
├── popup.js               Popup logic: live cost update, language, currency,
│                          license activation, close tabs, reset
├── options.html           Full control panel — history chart, audit table,
│                          pro settings, domain whitelist
├── options.js             Options logic: chart rendering, CSV export, pro config,
│                          domain management, collapsible cards
├── docs.html              In-extension user guide (EN / ES)
├── docs.js                Language toggle + smooth scroll for the guide
├── icon16.png             Toolbar icon
├── icon32.png
├── icon48.png
└── icon128.png            Chrome Web Store icon


🏗️ Architecture


TabCost is built on a zero-backend philosophy. There is no server, no telemetry, no analytics. Everything runs in the browser.


  ┌─────────────────────────────────────────────────────────────────────┐
  │  background.js  (Service Worker)                                    │
  │                                                                     │
  │  minuteTicker alarm  ──►  calculateOpportunityCost()                │
  │      │                        │                                     │
  │      │              tab.inactiveMinutes > graceMinutes ?            │
  │      │                        │                                     │
  │      │              cost += (rate/60) × impactFactor × elapsed      │
  │      │                        │                                     │
  │      │              chrome.storage.local ← dailyCost                │
  │      │                        │                                     │
  │  heartbeat alarm ──► ensureAlarms() + fallback recalc              │
  │  midnight check  ──► rotate dailyCost → dailyHistory[]             │
  │  Gumroad API     ──► verifyGumroadLicense() + fingerprint          │
  └─────────────────────────────────────────────────────────────────────┘
           ▲                            ▲
           │ chrome.runtime.sendMessage │ chrome.storage.local
           ▼                            ▼
  ┌──────────────┐             ┌─────────────────┐
  │  popup.js    │             │  options.js      │
  │              │             │                  │
  │  getCostData │             │  history chart   │
  │  closeRedTabs│             │  tab audit table │
  │  resetDaily  │             │  pro settings    │
  │  verifyLicense             │  domain whitelist│
  └──────────────┘             └─────────────────┘

File Responsibility
background.js Service worker. Cost engine, alarm management, tab interaction tracking, midnight rotation, Gumroad license verification with fingerprinting, push notifications.
popup.js Real-time cost display with animated counter. Language and currency switching. License activation. Close inactive tabs. Reset daily cost (Pro).
options.js Full control panel. Bar chart (14-day default, up to 365 for Pro). CSV export. Pro settings form. Domain whitelist CRUD. Collapsible card UI.
docs.js Language toggle and smooth scroll for the in-extension user guide.


🛡️ Privacy


  ✅  All processing happens locally inside your browser
  ✅  Tab data and cost stored only in chrome.storage.local
  ✅  Gumroad license verification is the only external network call
  ❌  No data sent to any TabCost server — there is no server
  ❌  No analytics, no telemetry, no session recording
  ❌  No account registration required



🧱 Built with


No build step. No external libraries. No npm. The history export is CSV-rendered in vanilla JS. The cost engine is a pure arithmetic service worker with alarm-based scheduling.



📸 Screenshots

Here’s how TabCost Pro looks in action.

Popup view Tab audit History chart (Pro)
Popup Audit History
Pro settings Notification example
Settings Notification

All screenshots are from the live extension running in Chrome.

You can also try the ▶ interactive live demo — a pixel-identical replica with a full guided tour. No install required.


🗺️ Roadmap


v1.5.6  ✅ Current

  • MV3 service worker with alarm-based cost engine
  • Minute-precision calculation with elapsed-time delta model
  • Gumroad license verification with fingerprinting + daily re-check
  • Midnight rotation: dailyCost → dailyHistory[]
  • Free grace period selector (1 min or 5 min)
  • Daily cost reset (Pro)
  • Push notification at configurable threshold
  • Bilingual popup + options + docs (EN / ES)
  • CSV export for history

v1.6  🔄 In progress

  • Weekly summary notification (total cost Mon–Sun)
  • Per-tab cost history (which sites cost the most over time)
  • Keyboard shortcut to open popup
  • Option to show cost in the browser badge icon

v2.0  🚀 Planned

  • Firefox port (MV3)
  • Pomodoro integration — pause tracking during focus sessions
  • iCloud / Google Drive sync for history (opt-in)
  • Team plan: shared reporting across a workspace

Have an idea? Open an issue — the roadmap is shaped by people actually using TabCost.



🤝 Contributing


Contributions are welcome. If you find a bug, have a feature idea, or want to improve the docs:

  1. Check existing issues — it may already be tracked.
  2. Open an issue first for anything beyond a small fix, so we can align before you invest time.
  3. Fork → branch → PR — keep changes focused and include a clear description of what changed and why.

Issues labelled good-first-issue are a good entry point.



📖 Documentation & support


     



👤 About the creator


Alexandre Iglesias

Visual designer who learned to code — because the tools I needed didn't exist yet.

I run Projekta2 Creative Studio in Girona, Spain. TabCost came from a simple frustration: I knew my idle tabs were costing me focus, but I couldn't see the number. So I built the number.

Other extensions


   




Stars help other freelancers and remote workers find TabCost. Takes one second — means a lot.



© 2026 TabCost Pro  ·  MIT License  ·  Privacy Policy  ·  Support  ·  Get Pro — $5


About

Track the real opportunity cost of your inactive tabs. Chrome extension for freelancers and billable professionals.

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors