aboutsummaryrefslogtreecommitdiff
path: root/pointless
diff options
context:
space:
mode:
authorpacien2018-10-24 04:39:48 +0200
committerpacien2018-10-24 04:55:15 +0200
commited02ccffb07a41e86a52a870e8f0abdc5d5078d0 (patch)
tree250372eb2ef10024391ea62fcca67de36b3223dc /pointless
parent28471e245eed59ebe0d57d7a4f162796eda0943d (diff)
downloadbeamer-viewer-ed02ccffb07a41e86a52a870e8f0abdc5d5078d0.tar.gz
Use URL anchor to avoid query cache miss
Diffstat (limited to 'pointless')
-rw-r--r--pointless/viewer/init.js7
1 files changed, 6 insertions, 1 deletions
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();