chore: complete remaining quick wins from TODO

- Move duplicated YouTube URL regexes to shared/utils.js
- Delete commented-out code blocks (theater mode, playback speed, cookie manipulation, debug vars)
- Add Page Visibility API to pause polling when tab is hidden
- Update TODO.md to reflect completed items

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lawrence Hook
2026-02-04 19:26:10 -05:00
parent 1dbea5ab66
commit 77d36b1360
4 changed files with 22 additions and 74 deletions
+3 -16
View File
@@ -1,18 +1,5 @@
# TODO
## Quick Wins
| Issue | Effort |
|-------|--------|
| Remove debug `console.log` in `options/main.js:174-175` | 1 min |
| Sync manifest versions (4.3.65 vs 4.3.66) | 1 min |
| Delete unused `TEMPLATE_FIELDSET` in `options/main.js:8` | 1 min |
| Delete dead `setCookie`/`getCookie` in `content-script/main.js:657-678` | 1 min |
| Fix `SEC_IN_WEEK` naming in `utils.js:69` (it's actually minutes) | 1 min |
| Move duplicated regexes to `shared/utils.js` | 5 min |
| Delete commented-out code blocks in `content-script/main.js` | 5 min |
| Add Page Visibility API to pause polling when tab is hidden | 10 min |
## Code Quality
- [ ] Auto-generate `idToShortId` map from `SECTIONS` instead of manual maintenance
@@ -23,9 +10,9 @@
## i18n / Localization
Hardcoded English strings that break for non-English YouTube:
- `content-script/main.js:171``'for you'` comparison
- `content-script/main.js:211``'Streamed'` check
- `content-script/main.js:467-468``'All'`, `'Related'` chip names
- `content-script/main.js``'for you'` comparison
- `content-script/main.js``'Streamed'` check
- `content-script/main.js``'All'`, `'Related'` chip names
## Incomplete Features