summaryrefslogtreecommitdiff
path: root/client/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/index.js')
-rw-r--r--client/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/index.js b/client/index.js
index 00729e4..fd40bb4 100644
--- a/client/index.js
+++ b/client/index.js
@@ -223,6 +223,7 @@ function pick_dataset(key){
console.log('pick dataset:', key, datasets[key])
i = 0
mass_i = 0
+ window.location.hash = key
dataset = datasets[key]
bounds = get_bounds(dataset)
diff = get_diff_bounds(bounds.rows)
@@ -344,8 +345,9 @@ function ready() {
document.querySelector('.loading').classList.remove('loading')
- document.querySelector('#dataset').value = 'Mass Shootings'
- pick_dataset('Mass Shootings')
+ const initial_dataset = decodeURIComponent(window.location.hash.substr(1)) || 'Mass Shootings'
+ document.querySelector('#dataset').value = initial_dataset
+ pick_dataset(initial_dataset)
document.querySelector('#scale').value = '14'
scales.pick(14)