Files
paulandClaude Opus 4.8 c2618ce0ea feat: cue-phrase candidate extraction + testable extract.js (task/smarter-candidate-extraction)
Catch artist names written in lowercase right after a cue phrase ("check out devourment",
"by cattle decapitation", "fan of ...") — the Title-Case/ALL-CAPS pass missed those.

- extension/extract.js (new): pure extraction (matchesIn + new cueMatchesIn + allMatchesIn),
  UMD so it loads as a content script AND require()s in node for tests. The cue pass uses the
  regex `d` flag to map matches back to positions for in-place wrapping; a small cue-stoplist
  drops "the/this/new/..." right after the cue.
- extension/content.js: extraction now comes from globalThis.RSLExtract.allMatchesIn
  (Title-Case + cue union), keeping the existing position-based wrapping.
- extension/manifest.json: load extract.js before content.js.
- extension/extract.test.cjs (new) + scripts/check.sh: 6 node:test cases for the extraction
  logic; check.sh now runs the extension tests too (16 total, green).
- README: updated the detection limitation note.

Deferred (design item 2): merging names split across inline formatting (cross-node) — more
involved; left as a follow-up.

Verified: scripts/check.sh green (16 tests). In-browser behavior is logic-verified only (no
headless Firefox); additive to the pending background-fix re-test — the [rsl] logs distinguish
"candidates found" from "resolve failed".

Source: task/smarter-candidate-extraction (objective/linker-improvements).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 06:36:28 +00:00

32 lines
817 B
JSON

{
"manifest_version": 2,
"name": "Reddit → Spotify/Bandcamp linker",
"version": "0.1.0",
"description": "Turns artist/album names in reddit comments into Spotify and Bandcamp links.",
"browser_specific_settings": {
"gecko": {
"id": "reddit-spotify-linker@paul.yapplesauce.com",
"strict_min_version": "109.0"
}
},
"permissions": [
"http://localhost:8787/*",
"http://127.0.0.1:8787/*"
],
"background": {
"scripts": ["background.js"]
},
"browser_action": {
"default_icon": "icon.svg",
"default_title": "Reddit → Spotify/Bandcamp linker (active on reddit threads)"
},
"content_scripts": [
{
"matches": ["*://*.reddit.com/*"],
"js": ["extract.js", "content.js"],
"css": ["styles.css"],
"run_at": "document_idle"
}
]
}