From 1b086936a927aed44e505b12239c78fefa1e058c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 8 Mar 2019 20:51:11 +0100 Subject: chart! --- client/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/index.js') diff --git a/client/index.js b/client/index.js index 1e4e2eb8..87214925 100644 --- a/client/index.js +++ b/client/index.js @@ -80,14 +80,14 @@ function runApplets() { url = null } } - if (('datasets' in payload) && !dataset && !url) { + if ((('datasets' in payload) && !dataset && !url) || window.location.pathname.match('datasets')) { const path = window.location.pathname.split('/').filter(s => !!s) - if (path.length) { + if (path.length > 1) { dataset = path.pop() if (dataset === 'index.html') { dataset = path.pop() } - // console.log('dataset from path:', dataset) + console.log('dataset from path:', dataset) } else { console.log('couldnt determine citations dataset') return null -- cgit v1.2.3-70-g09d2 From 96407e66872265f3b387f0800cee209300a227df Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 8 Mar 2019 21:34:11 +0100 Subject: fix js --- client/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/index.js') diff --git a/client/index.js b/client/index.js index 87214925..dd60c0ed 100644 --- a/client/index.js +++ b/client/index.js @@ -89,8 +89,8 @@ function runApplets() { } console.log('dataset from path:', dataset) } else { - console.log('couldnt determine citations dataset') - return null + console.log('not on a dataset page') + return [el, payload] } } payload.dataset = dataset -- cgit v1.2.3-70-g09d2