aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/nuldoc/static/slides
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-11-30 03:10:01 +0900
committernsfisis <nsfisis@gmail.com>2025-11-30 03:10:01 +0900
commit277ff78fa74be86de86fdfa66af7f4ae2fb17980 (patch)
treebc4a24da8eb24149460f950ef73eefa9653d704a /services/nuldoc/static/slides
parent1730a81a6560c2baa75791d6edba2e2a1d997d4e (diff)
downloadnsfisis.dev-277ff78fa74be86de86fdfa66af7f4ae2fb17980.tar.gz
nsfisis.dev-277ff78fa74be86de86fdfa66af7f4ae2fb17980.tar.zst
nsfisis.dev-277ff78fa74be86de86fdfa66af7f4ae2fb17980.zip
feat(slides): Update style of slide controller buttons
Diffstat (limited to 'services/nuldoc/static/slides')
-rw-r--r--services/nuldoc/static/slides/slide.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/services/nuldoc/static/slides/slide.js b/services/nuldoc/static/slides/slide.js
index 4c7a0de..75a8d35 100644
--- a/services/nuldoc/static/slides/slide.js
+++ b/services/nuldoc/static/slides/slide.js
@@ -1,6 +1,6 @@
-import { GlobalWorkerOptions, getDocument } from "/pdf.min.mjs";
+import { getDocument, GlobalWorkerOptions } from "./pdf.min.mjs";
-document.addEventListener("DOMContentLoaded", async () => {
+async function init() {
GlobalWorkerOptions.workerSrc = "/pdf.worker.min.mjs";
const canvas = document.getElementById("slide");
@@ -57,4 +57,6 @@ document.addEventListener("DOMContentLoaded", async () => {
// TODO: error handling
doc = await getDocument(url).promise;
queueRenderPage(pageNum);
-});
+}
+
+document.addEventListener("DOMContentLoaded", init);