diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-05-23 01:27:26 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-05-23 01:27:26 -0400 |
| commit | 0ff5329fe7eccebd470f61e66c144332dab1f323 (patch) | |
| tree | 85c8286ea27901720aae976e2374f24b88988bb6 /js | |
| parent | 83a0e0e87986477283d52178912bd76ba29ebde5 (diff) | |
check hash
Diffstat (limited to 'js')
| -rw-r--r-- | js/ui/evolver.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/ui/evolver.js b/js/ui/evolver.js index c900965..0ce56a6 100644 --- a/js/ui/evolver.js +++ b/js/ui/evolver.js @@ -2,7 +2,6 @@ var evolver = (function(){ setTimeout(init) - var hash = window.location.hash var opt = { src: "img/test/quad.gif", w: 30, @@ -10,8 +9,8 @@ var evolver = (function(){ population: 10, strokes: 1, } - if (hash.length) { - hash.split("#").forEach(function(s){ + if (window.location.hash.length) { + window.location.hash.substr(0).split("&").forEach(function(s){ var kv = s.split("=") if (opt.hasOwnProperty(kv[0])) { opt[kv[0]] = kv[0] == "src" ? kv[1] : parseInt(kv[1]) |
