From 149e226729aee727da8fd44f2f759e28f7550368 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 10 Dec 2017 12:19:07 +1300 Subject: [PATCH] move toggleMenu call from html onclick to DOM addEventListener --- ArchiveState.go | 4 ++-- static/archive.js | 4 ++++ static/style.css | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ArchiveState.go b/ArchiveState.go index be62065..4947a58 100644 --- a/ArchiveState.go +++ b/ArchiveState.go @@ -191,9 +191,9 @@ func (this *ArchiveState) renderTemplateHead(w http.ResponseWriter) { Download backup - diff --git a/static/archive.js b/static/archive.js index 69e1b16..5109286 100755 --- a/static/archive.js +++ b/static/archive.js @@ -93,6 +93,10 @@ function onLoad() { // + document.getElementById("logo").addEventListener("click", toggleMenu); + + // + if ( ! /\/search\//.test(window.location.pathname) && document.location.hash.substr(0, 6) === '#line-' diff --git a/static/style.css b/static/style.css index 367ca07..100e18f 100644 --- a/static/style.css +++ b/static/style.css @@ -122,6 +122,8 @@ select { } #logo { + cursor:pointer; + display:inline-block; width:16px; height:16px;