diff options
-rw-r--r-- | index.html | 2 | ||||
-rw-r--r-- | pointless/viewer/init.js | 7 | ||||
-rw-r--r-- | readme.md | 2 |
3 files changed, 8 insertions, 3 deletions
@@ -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 | ||
21 | const params = function() { | 21 | const 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 | ||
61 | function load(file) { | ||
62 | location.hash = "file=" + file; | ||
63 | location.reload(); | ||
64 | } | ||
65 | |||
61 | if (isController()) | 66 | if (isController()) |
62 | init(); | 67 | init(); |
@@ -11,7 +11,7 @@ An instance of this web application is deployed at [pointlessviewer.pacien.org]( | |||
11 | 11 | ||
12 | A double-width presentation may be generated with _Beamer_ using `\setbeameroption{show notes on second screen=right}`. | 12 | A double-width presentation may be generated with _Beamer_ using `\setbeameroption{show notes on second screen=right}`. |
13 | 13 | ||
14 | A demonstration is available [here](https://pointlessviewer.pacien.org/?file=sample/demo.pdf). | 14 | A demonstration is available [here](https://pointlessviewer.pacien.org/#file=sample/demo.pdf). |
15 | 15 | ||
16 | 16 | ||
17 | ## License | 17 | ## License |