fix(manga): restore badgeHost, and make that class of bug a lint error #13

Merged
rms merged 1 commit from fix/badgehost-restore into master 2026-11-28 03:05:00 -06:00
Owner

badgeHost was inside the block replaced when the badge became an element (2.1.6), so every mark pass threw ReferenceError and no badge rendered. Restored, plus biome.json enables correctness/noUndeclaredVariables as an error with browser/userscript globals declared - verified by reintroducing the typo and watching the check fail. v2.1.9.

badgeHost was inside the block replaced when the badge became an element (2.1.6), so every mark pass threw ReferenceError and no badge rendered. Restored, plus biome.json enables correctness/noUndeclaredVariables as an error with browser/userscript globals declared - verified by reintroducing the typo and watching the check fail. v2.1.9.
Every badge pass was throwing `ReferenceError: badgeHost is not defined`: when the
badge became an element (2.1.6) the block I replaced ran from the glyph table to
the mirror-selection comment, and badgeHost sat inside it. The badge never
rendered again, and nothing in the pipeline could notice - `node --check` parses,
biome had no rule for it, and the failure is only visible in the page console.

Two parts:

  * badgeHost is back where it belongs, with a comment saying what happened and
    what the card-based positioning is for;
  * biome.json enables `correctness/noUndeclaredVariables` as an error, with the
    browser/userscript globals declared. Verified by reintroducing the typo: the
    check fails on `The badgeHost variable is undeclared` and passes once
    restored, so the next edit of this shape cannot ship silently.
    (`saveAs` in the grind-75 script is a FileSaver global, so it is declared
    alongside the DOM ones.)

v2.1.9." && git push -q -u origin fix/badgehost-restore 2>&1|tail -1; TOK=$(sops -d /Users/rms/Documents/Repositories/homelab/hosts/minerva/secrets/secrets.yaml 2>/dev/null | grep -E '^\s+forgejo_api_token:' | awk '{print $2}'); N=$(curl -s -X POST -H "Authorization: token $TOK" -H "Content-Type: application/json" -d '{"head":"fix/badgehost-restore","base":"master","title":"fix(manga): restore badgeHost, and make that class of bug a lint error","body":"badgeHost was inside the block replaced when the badge became an element (2.1.6), so every mark pass threw ReferenceError and the badge never rendered again. Restored, plus biome.json enables correctness/noUndeclaredVariables as an error (with browser/userscript globals declared) - verified by reintroducing the typo and watching the check fail. v2.1.9."}' https://forgejo.home.arpa/api/v1/repos/rms/userscripts/pulls | python3 -c "import sys,json;d=json.load(sys.stdin);print(d.get('number') or d.get('message'))"); sleep 2; curl -s -o /dev/null -w "merge %{http_code}\n" -X POST -H "Authorization: token $TOK" -H "Content-Type: application/json" -d '{"Do":"rebase"}' "https://forgejo.home.arpa/api/v1/repos/rms/userscripts/pulls/$N/merge"; cd ~/Documents/Repositories/userscripts && git worktree remove ../userscripts-badge-fix --force 2>/dev/null; git push -q origin --delete fix/badgehost-restore 2>&1|tail -1; git pull --ff-only -q && git log --oneline -1; rm -f /tmp/keep.js /tmp/b.txt
rms merged commit 33c707b101 into master 2026-11-28 03:05:00 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rms/userscripts!13
No description provided.