aboutsummaryrefslogtreecommitdiff
path: root/pointless
diff options
context:
space:
mode:
authorpacien2018-07-21 02:17:02 +0200
committerpacien2018-07-21 02:17:02 +0200
commit29eba60e321667b73f9c97d73e55be69b344ef1b (patch)
tree5e79d6e6b9f9533cdebd6a4bbf393b5030eb9f13 /pointless
parent67ee634c9e1037708519bd42d348243aa9cea468 (diff)
downloadbeamer-viewer-29eba60e321667b73f9c97d73e55be69b344ef1b.tar.gz
Add noscript warning
Diffstat (limited to 'pointless')
-rw-r--r--pointless/viewer/screen.js6
-rw-r--r--pointless/viewer/viewer.css6
-rw-r--r--pointless/viewer/viewer.js4
3 files changed, 11 insertions, 5 deletions
diff --git a/pointless/viewer/screen.js b/pointless/viewer/screen.js
index 9ba4574..4f5e5bf 100644
--- a/pointless/viewer/screen.js
+++ b/pointless/viewer/screen.js
@@ -19,6 +19,7 @@ class Screen {
19 this.pageTurnCount = 0; 19 this.pageTurnCount = 0;
20 20
21 this._registerListeners(); 21 this._registerListeners();
22 this._hideWelcomeScreen();
22 } 23 }
23 24
24 setPage(page) { 25 setPage(page) {
@@ -36,6 +37,11 @@ class Screen {
36 }); 37 });
37 } 38 }
38 39
40 _hideWelcomeScreen() {
41 const welcomeScreen = this.window.document.getElementById("welcomeScreen");
42 welcomeScreen.style.display = "none";
43 }
44
39 _getScreenSize(ratio) { 45 _getScreenSize(ratio) {
40 const windowRatio = this.window.innerWidth / this.window.innerHeight; 46 const windowRatio = this.window.innerWidth / this.window.innerHeight;
41 const horizontalScaleFactor = ratio / windowRatio; 47 const horizontalScaleFactor = ratio / windowRatio;
diff --git a/pointless/viewer/viewer.css b/pointless/viewer/viewer.css
index 09ef4e1..21bba3b 100644
--- a/pointless/viewer/viewer.css
+++ b/pointless/viewer/viewer.css
@@ -31,7 +31,6 @@ header span {
31} 31}
32 32
33#welcomeScreen { 33#welcomeScreen {
34 display: none;
35 max-height: 100%; 34 max-height: 100%;
36 min-width: 20rem; 35 min-width: 20rem;
37 overflow: auto; 36 overflow: auto;
@@ -98,3 +97,8 @@ header span {
98.notification:empty { 97.notification:empty {
99 display: none; 98 display: none;
100} 99}
100
101.warning {
102 font-weight: bold;
103 color: orangered;
104}
diff --git a/pointless/viewer/viewer.js b/pointless/viewer/viewer.js
index e3a1043..f4cc348 100644
--- a/pointless/viewer/viewer.js
+++ b/pointless/viewer/viewer.js
@@ -9,15 +9,11 @@
9 9
10class Viewer { 10class Viewer {
11 constructor() { 11 constructor() {
12 this.welcomeScreen = document.getElementById("welcomeScreen");
13 this.fileInput = document.getElementById("fileInput"); 12 this.fileInput = document.getElementById("fileInput");
14
15 this.welcomeScreen.style.display = "block";
16 this._listenForInput(); 13 this._listenForInput();
17 } 14 }
18 15
19 load(source) { 16 load(source) {
20 this.welcomeScreen.style.display = "none";
21 pdfjsLib.getDocument(source).then(function(pdf) { 17 pdfjsLib.getDocument(source).then(function(pdf) {
22 const presentation = new Presentation(pdf); 18 const presentation = new Presentation(pdf);
23 }).catch(function(error) { 19 }).catch(function(error) {