feat: add user instructions to viewer popup

This commit is contained in:
robot committed 2026-08-31 03:26:50 +00:00
1 parent c366f0b8c4
commit 97abaf42d9
9 files changed
+462

No files matched your search

+16
View File
@@ -34,10 +34,26 @@ const openBtn = document.getElementById('open-btn');
const statusEl = document.getElementById('status');
const listEl = document.getElementById('video-list');
const btnRow = document.getElementById('btn-row');
const instructionsToggle = document.getElementById('instructions-toggle');
const instructionsBody = document.getElementById('instructions-body');
listEl.style.wordBreak = 'break-word';
listEl.style.whiteSpace = 'pre-wrap';
function setInstructionsExpanded(expanded) {
if (!instructionsToggle || !instructionsBody) return;
instructionsBody.hidden = !expanded;
instructionsToggle.setAttribute('aria-expanded', String(expanded));
instructionsToggle.textContent = expanded ? 'Hide instructions' : 'Show instructions';
}
if (instructionsToggle && instructionsBody) {
setInstructionsExpanded(true);
instructionsToggle.addEventListener('click', () => {
setInstructionsExpanded(instructionsBody.hidden);
});
}
/* ======================================================================== */
/* UI helpers */
/* ======================================================================== */