move toggleMenu call from html onclick to DOM addEventListener
This commit is contained in:
parent
3c3028b8d1
commit
149e226729
@ -191,9 +191,9 @@ func (this *ArchiveState) renderTemplateHead(w http.ResponseWriter) {
|
|||||||
<a href="/download" onclick="return confirm('Are you sure you want to download a backup?');">Download backup</a>
|
<a href="/download" onclick="return confirm('Are you sure you want to download a backup?');">Download backup</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a onclick="toggleMenu();"><div id="logo" class="layout-pushdown"><svg viewBox="0 0 24 24">
|
<div id="logo" class="layout-pushdown"><svg viewBox="0 0 24 24">
|
||||||
<path fill="#000000" d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z" />
|
<path fill="#000000" d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z" />
|
||||||
</svg></div></a>
|
</svg></div>
|
||||||
|
|
||||||
<span class="area-nav">
|
<span class="area-nav">
|
||||||
|
|
||||||
|
@ -93,6 +93,10 @@ function onLoad() {
|
|||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
document.getElementById("logo").addEventListener("click", toggleMenu);
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
if (
|
if (
|
||||||
! /\/search\//.test(window.location.pathname) &&
|
! /\/search\//.test(window.location.pathname) &&
|
||||||
document.location.hash.substr(0, 6) === '#line-'
|
document.location.hash.substr(0, 6) === '#line-'
|
||||||
|
@ -122,6 +122,8 @@ select {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#logo {
|
#logo {
|
||||||
|
cursor:pointer;
|
||||||
|
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
width:16px;
|
width:16px;
|
||||||
height:16px;
|
height:16px;
|
||||||
|
Loading…
Reference in New Issue
Block a user