A slideshow folder now plays .docx files alongside images: a one-page
document is shown whole (letterboxed like a photo); a longer one fills
the width and scrolls smoothly top to bottom during its docInterval
(new slideshow.json key, default 2x interval). Word's ~$ lock files are
skipped; changed documents (by mtime) are re-read on the minute refresh.
- kiosk-app/docx-render.js: the docx-preview rendering now shared by
docview.html and slideshow.html. Each render gets its own class prefix
and keeps its styles in its own container, so two documents crossfading
can't restyle each other. "One page" is judged by content fitting the
paper height, not section count - docx-preview only starts a new
section at explicit page breaks, so a long unbroken document is one
tall section.
- Document bytes are fetched on demand: the page sets its title to a
request, slideshow.js answers via executeJavaScript - only for a .docx
in that slideshow's own current listing (no file-read API exposed to
pages; the preload is shared by every site).
Tested with the real main.js on Electron 44.5.1 under Xvfb + Openbox on a
folder of 2 images + a 1-page and a long .docx (+ a ~$ lock file): order,
crossfades, whole-page fit, scroll to the end, lock file skipped; the
single-.docx site still renders. The request handler answered a listed
.docx and refused /etc/passwd, a listed image, and a .docx outside the
folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjz8a58eB5P9sUweqd3NHm