From 38b6b8d3f78b66fea9a5eeeb94786e42f0bc3148 Mon Sep 17 00:00:00 2001 From: David Keane Date: Mon, 8 Jun 2026 23:31:29 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20initial=20commit=20=E2=80=94=20RangerHQ?= =?UTF-8?q?=20Tuner=20v0.1.0=20(Tier=201=20MVP)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chrome MV3 extension, browser-resident sibling to rangerhq-radio (WP plugin). Plays SomaFM via the chrome.offscreen API + a source- adapter pattern at src/sources/. Architecture highlights: - Audio runs in offscreen document — SW would get killed. - Source-adapter pattern locks Tier 1 contract (RadioSource interface in src/sources/base-source.js). Adding a network = drop a file + register one line in src/sources/index.js. - Vanilla JS, no build step. Pure ES modules. - No telemetry, no third-party JS. Outbound only to somafm.com. - Narrow permissions: offscreen + storage + somafm.com host_perms. No tabs, no , no webRequest. 22 files, ~30 min build following the saved plan at ~/.ranger-memory/projects/rangerhq-tuner-plan.md. Tier 2 + Tier 3 (Web Store submission) not started. --- .gitignore | 9 ++ CHANGELOG.md | 83 ++++++++++ README.md | 43 +++++ manifest.json | 32 ++++ src/assets/icons/icon-128.png | Bin 0 -> 14722 bytes src/assets/icons/icon-16.png | Bin 0 -> 930 bytes src/assets/icons/icon-32.png | Bin 0 -> 1597 bytes src/assets/icons/icon-48.png | Bin 0 -> 2853 bytes src/assets/img/ranger.png | Bin 0 -> 75937 bytes src/background/service-worker.js | 39 +++++ src/lib/messages.js | 19 +++ src/lib/playlist-parser.js | 19 +++ src/offscreen/offscreen.html | 11 ++ src/offscreen/offscreen.js | 48 ++++++ src/popup/popup.css | 268 +++++++++++++++++++++++++++++++ src/popup/popup.html | 45 ++++++ src/popup/popup.js | 231 ++++++++++++++++++++++++++ src/sources/base-source.js | 34 ++++ src/sources/index.js | 35 ++++ src/sources/somafm.js | 85 ++++++++++ 20 files changed, 1001 insertions(+) create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 README.md create mode 100644 manifest.json create mode 100644 src/assets/icons/icon-128.png create mode 100644 src/assets/icons/icon-16.png create mode 100644 src/assets/icons/icon-32.png create mode 100644 src/assets/icons/icon-48.png create mode 100644 src/assets/img/ranger.png create mode 100644 src/background/service-worker.js create mode 100644 src/lib/messages.js create mode 100644 src/lib/playlist-parser.js create mode 100644 src/offscreen/offscreen.html create mode 100644 src/offscreen/offscreen.js create mode 100644 src/popup/popup.css create mode 100644 src/popup/popup.html create mode 100644 src/popup/popup.js create mode 100644 src/sources/base-source.js create mode 100644 src/sources/index.js create mode 100644 src/sources/somafm.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..42e300f --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.DS_Store +node_modules/ +dist/ + +# .crx is the packed extension build, .pem is the signing key. +# Losing the .pem means you can never update the same extension ID, +# so it lives outside git and gets backed up separately. +*.crx +*.pem diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..69450c0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,83 @@ +# Changelog + +All notable changes to **RangerHQ Tuner** are documented here. +Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/) — versioning: [SemVer](https://semver.org/). + +--- + +## [Unreleased] + +### Planned — New Tab Page override (Tier 2.5) +- Replace Chrome's default New Tab Page with a RangerHQ-branded version that surfaces the player, current track, and a quick-station picker. +- Adds `chrome_url_overrides.newtab` to `manifest.json` pointing at `src/newtab/newtab.html`. +- Reuses the popup's CSS palette + source-adapter pattern — no new architectural concepts. + +--- + +## [0.1.0] — 2026-06-08 + +### Added — Tier 1 MVP (Buddy is alive — er, Tuner is alive) + +**Buddy's browser cousin lives.** First release of RangerHQ Tuner — a Chrome Manifest V3 extension that plays SomaFM internet radio from your toolbar. Sibling to [`rangerhq-radio`](https://git.davidtkeane.com/ranger/rangerhq-radio) (the WordPress version live on wp.org since 2026-06-04). Same brand idea, different surface: WP version lives in admin pages, Chrome version lives one toolbar-click away no matter what you're doing. + +#### Architecture + +- **Manifest V3** — uses the `chrome.offscreen` API to host the `