diff options
Diffstat (limited to 'pointless')
-rw-r--r-- | pointless/viewer/init.js | 7 |
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 | ||
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(); |