60331b8350d849e6b005dff1753e2cb7e602975b
Two fixes in one commit, both responding to David's testing of
v0.5.3-prep:
1. Quick Stations 'Loading...' stuck
The picker showed 'Loading channel list…' indefinitely when the
user opened Options BEFORE ever opening the New Tab Page (so the
tuner.stationsCache hadn't been populated yet). Fix:
initQuickStationsUI now falls back to calling listAllStations()
directly if the cache is empty, then writes the result back to
cache so future opens are instant. New error message if the network
fetch fails: 'Could not load SomaFM channel list — check your
network connection and reopen Settings.'
2. History export (JSON + CSV)
Added two buttons in the Local data card 'Export history (JSON)'
and 'Export history (CSV)'. JSON dumps the full tuner.history array
pretty-printed; CSV uses RFC 4180 quoting (every cell quoted, doubled
quotes for embedded quotes) with header artist,title,station,
station_id,when_iso. Filename: rangerhq-tuner-history-YYYY-MM-DD.{ext}.
Empty-history case shows an error toast. Toast confirms count + format
on success.
Per David: 'this app is kinda done' after this, then upload to Web
Store once v0.5.0 clears.
RangerHQ Tuner
🎉 Install from the Chrome Web Store →
Lightweight indie internet radio player for Chrome. Plays SomaFM in any browser tab. Manifest V3, vanilla JS, no telemetry.
Sibling to rangerhq-radio (the WordPress version).
Tier 1 — MVP (current)
- ✅ Manifest V3 + Offscreen API audio
- ✅ Loads all SomaFM channels from
channels.json - ✅ Pick a station, click Play, audio runs in background
- ✅ Volume + state persisted across popup open/close
- ✅ Catalogue cached 6h in
chrome.storage.local - ✅ Source-adapter pattern in place for future networks
Install (developer mode)
- Open
chrome://extensions - Toggle Developer mode on (top right)
- Click Load unpacked → pick this folder (
rangerhq-tuner/) - Pin the extension to your toolbar (puzzle icon → pin)
- Click the toolbar icon → pick a SomaFM station → ▶ Play
Project layout
rangerhq-tuner/
├── manifest.json
└── src/
├── background/service-worker.js # message router, no audio here
├── offscreen/offscreen.{html,js} # the <audio> element host (MV3 needs this)
├── popup/popup.{html,css,js} # the toolbar UI
├── sources/ # extensibility seam
│ ├── base-source.js # RadioSource interface (JSDoc)
│ ├── somafm.js # first concrete adapter
│ └── index.js # registry
├── lib/ # shared utilities
└── assets/icons/ # 16/32/48/128 PNGs
License
GPL-2.0-or-later — matches the rest of the RangerHQ family.
Releases
6
Languages
JavaScript
58.3%
CSS
31.4%
HTML
10.3%