Fix admin plugin UI not rendering (class-based mount point) #6

Merged
troed merged 1 commit from mount-fix into main 2026-08-07 22:41:48 +02:00
Owner

PeerTube's html-type plugin settings are sanitized client-side: the id attribute is stripped from injected markup (verified live: the placeholder renders as <div><p>... with no id). The client script used getElementById('peertube-plugin-peeryou-admin') which returned null, so render() bailed and the settings page only showed the 'Loading peeryou controls…' placeholder.

Fix: use a class-based mount point (.peertube-plugin-peeryou-admin) in the html setting and query via document.querySelector(...), matching the canonical peerTube plugin pattern (peertube-plugin-livechat uses classes for the same reason).

Changes: main.js html setting id→class; client script getElementById→querySelector; tests updated. Version bumped 0.1.3→0.1.4. All 112 tests pass.

PeerTube's html-type plugin settings are sanitized client-side: the `id` attribute is stripped from injected markup (verified live: the placeholder renders as `<div><p>...` with no id). The client script used `getElementById('peertube-plugin-peeryou-admin')` which returned null, so render() bailed and the settings page only showed the 'Loading peeryou controls…' placeholder. Fix: use a `class`-based mount point (`.peertube-plugin-peeryou-admin`) in the html setting and query via `document.querySelector(...)`, matching the canonical peerTube plugin pattern (peertube-plugin-livechat uses classes for the same reason). Changes: main.js html setting id→class; client script getElementById→querySelector; tests updated. Version bumped 0.1.3→0.1.4. All 112 tests pass.
troed merged commit 4c7a70f7f1 into main 2026-08-07 22:41:48 +02:00
troed deleted branch mount-fix 2026-08-07 22:41:48 +02: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
troed/peeryou!6
No description provided.