A lightweight WXT-powered browser extension that keeps tabs alive by auto-refreshing them on a schedule. Supports continuous refresh, wait-until-load, and limited-run modes with a simple popup UI.
Hosted site: https://grikomsn.github.io/keepmealive/
- Per-tab refresh scheduling with configurable intervals (5s, 10s, 30s, 1m, 5m) or custom values.
- Modes: Continuous, Wait for Load, Limited runs (auto-stop after N refreshes).
- Browser action badge shows live countdown; clears when inactive.
- Context menus: Start, Stop, and Quick Interval shortcuts from the popup.
- Robust per-tab storage cleanup on tab close and error handling around reloads.
- Shows current tab hostname, status, next refresh countdown, and active timers list.
- Controls: interval dropdown (with custom), mode selector, limited-run count, Start/Stop/Reset.
- Live updates via storage watch and background messaging.
- One alarm per tab (
refresh-<tabId>) scheduled fromlocal:refreshConfigs. - On alarm: reloads the tab, handles limited-run decrement, and reschedules per mode.
- Wait-for-load reschedules after
tabs.onUpdatedreportscomplete. - Badge updates every second with countdown seconds or ellipsis when overdue.
- Message types (popup → background):
START_REFRESH,STOP_REFRESH,GET_CONFIG,GET_ALL_CONFIGS(always includestabId).
- Root: "Keep Me Alive" with Start (defaults to 1m), Stop, and Quick Interval entries for the predefined intervals.
- Menu enabled/disabled state follows the active tab’s config; recreated on install/startup.
RefreshMode:CONTINUOUS|WAIT_FOR_LOAD|LIMITEDRefreshConfig:{ tabId, intervalMs, enabled, nextRefreshAt, mode, remainingRuns? }INTERVALS:[5000, 10000, 30000, 60000, 300000]
alarms,tabs,storage,activeTab,contextMenus(seewxt.config.ts).
Built with WXT (Vite-based tooling for web extensions).
- Install:
bun install(postinstall regenerates WXT types). - Dev builds:
bun run dev(Chrome),bun run dev:firefox. - Production builds:
bun run build(Chrome MV3),bun run build:firefox(Firefox MV2). - Packaging:
bun run zip,bun run zip:firefox. - Build outputs:
dist/chrome-mv3/,dist/firefox-mv2/,dist/safari-mv2/(zip commands place archives alongside). - Type-check only:
bun run compile. - Release (GitHub): tag a release; workflow builds/zips Chrome & Firefox and uploads zips to assets.
- Chrome MV3 alarms are most reliable at ≥1 minute; shorter mostly for dev.
- Background listener returns
truewhen replying asynchronously. - Storage is per-tab; entries cleared on tab close.
- Always run
bun run buildafter changes to catch manifest/TypeScript issues.
MIT License. See LICENSE for details.