aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.html2
-rw-r--r--pointless/viewer/init.js7
-rw-r--r--readme.md2
3 files changed, 8 insertions, 3 deletions
diff --git a/index.html b/index.html
index ce02062..c03dffb 100644
--- a/index.html
+++ b/index.html
@@ -74,7 +74,7 @@
74 <li><a href="https://github.com/pacien/pointless-viewer/issues">Bug tracker</a></li> 74 <li><a href="https://github.com/pacien/pointless-viewer/issues">Bug tracker</a></li>
75 <li><a href="https://cgit.pacien.net/public/apps/pointless-viewer/">Source repository</a></li> 75 <li><a href="https://cgit.pacien.net/public/apps/pointless-viewer/">Source repository</a></li>
76 <li><a href="https://mozilla.github.io/pdf.js/">Powered by PDF.js</a></li> 76 <li><a href="https://mozilla.github.io/pdf.js/">Powered by PDF.js</a></li>
77 <li><a href="?file=sample/demo.pdf">Demo</a></li> 77 <li><a href="javascript:load('sample/demo.pdf')">Demo</a></li>
78 </ul> 78 </ul>
79 </div> 79 </div>
80 </div> 80 </div>
diff --git a/pointless/viewer/init.js b/pointless/viewer/init.js
index 01f550c..e76ab1b 100644
--- a/pointless/viewer/init.js
+++ b/pointless/viewer/init.js
@@ -20,7 +20,7 @@
20 20
21const params = function() { 21const params = function() {
22 const queryDict = {}; 22 const queryDict = {};
23 location.search.substr(1).split("&").forEach(function(item) { 23 location.hash.substr(1).split("&").forEach(item => {
24 const pair = item.split("="); 24 const pair = item.split("=");
25 queryDict[pair[0]] = pair[1]; 25 queryDict[pair[0]] = pair[1];
26 }); 26 });
@@ -58,5 +58,10 @@ function init() {
58 viewer.load(params["file"]); 58 viewer.load(params["file"]);
59} 59}
60 60
61function load(file) {
62 location.hash = "file=" + file;
63 location.reload();
64}
65
61if (isController()) 66if (isController())
62 init(); 67 init();
diff --git a/readme.md b/readme.md
index 5f6b64a..40ce682 100644
--- a/readme.md
+++ b/readme.md
@@ -11,7 +11,7 @@ An instance of this web application is deployed at [pointlessviewer.pacien.org](
11 11
12A double-width presentation may be generated with _Beamer_ using `\setbeameroption{show notes on second screen=right}`. 12A double-width presentation may be generated with _Beamer_ using `\setbeameroption{show notes on second screen=right}`.
13 13
14A demonstration is available [here](https://pointlessviewer.pacien.org/?file=sample/demo.pdf). 14A demonstration is available [here](https://pointlessviewer.pacien.org/#file=sample/demo.pdf).
15 15
16 16
17## License 17## License