From 16ccaea6fd30c97f179af18f5e393ef88434f6b4 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Mon, 30 Apr 2018 13:57:18 +0100 Subject: Fix/tidy front-only hover behaviour. --- web/js/front.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'web/js/front.js') diff --git a/web/js/front.js b/web/js/front.js index 8471972d4..67486888b 100644 --- a/web/js/front.js +++ b/web/js/front.js @@ -15,4 +15,11 @@ document.getElementById('pc').focus(); var link = around_links[i]; link.href = link.href + (link.href.indexOf('?') > -1 ? '&js=1' : '?js=1'); } + + var lk = document.querySelector('span.report-a-problem-btn'); + if (lk.addEventListener) { + lk.addEventListener('click', function(){ + scrollTo(0,0); + }); + } })(); -- cgit v1.2.3