aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--beamer/viewer/viewer.js5
-rw-r--r--index.html2
2 files changed, 6 insertions, 1 deletions
diff --git a/beamer/viewer/viewer.js b/beamer/viewer/viewer.js
index e9c6d65..a614c88 100644
--- a/beamer/viewer/viewer.js
+++ b/beamer/viewer/viewer.js
@@ -26,9 +26,14 @@ class Viewer {
26 this.fileReader = new FileReader(); 26 this.fileReader = new FileReader();
27 this.presentation = null; 27 this.presentation = null;
28 28
29 document.addEventListener("DOMContentLoaded", () => this._unlockUi());
29 this._listenForInput(); 30 this._listenForInput();
30 } 31 }
31 32
33 _unlockUi() {
34 this.fileInput.disabled = false;
35 }
36
32 _preparePresentation(source) { 37 _preparePresentation(source) {
33 const self = this; 38 const self = this;
34 pdfjsLib.getDocument(source).then(function(pdf) { 39 pdfjsLib.getDocument(source).then(function(pdf) {
diff --git a/index.html b/index.html
index f92f772..7259fe9 100644
--- a/index.html
+++ b/index.html
@@ -70,7 +70,7 @@
70 <a href="#file=sample/demo.pdf" onclick="load('sample/demo.pdf')">demo slides</a>. 70 <a href="#file=sample/demo.pdf" onclick="load('sample/demo.pdf')">demo slides</a>.
71 </p> 71 </p>
72 72
73 <input id="fileInput" type="file" multiple="false" accept="application/pdf" /> 73 <input id="fileInput" type="file" multiple="false" accept="application/pdf" disabled />
74 <br /> 74 <br />
75 <br /> 75 <br />
76 <input id="startButton" type="button" value="Start presentation" disabled /> 76 <input id="startButton" type="button" value="Start presentation" disabled />