From 191406b486b5bb939d4ac8a23ed4ecd8b92ddbdb Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 4 Oct 2019 02:32:44 -0400 Subject: [PATCH] can't use shortened form for honker links --- views/honk.html | 2 +- views/honkpage.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/views/honk.html b/views/honk.html index 241b30e..e8e407d 100644 --- a/views/honk.html +++ b/views/honk.html @@ -8,7 +8,7 @@ {{ end }}

{{ if $bonkcsrf }} -{{ .Username }} +{{ .Username }} {{ else }} {{ .Username }} {{ end }} diff --git a/views/honkpage.js b/views/honkpage.js index c59674c..76f39af 100644 --- a/views/honkpage.js +++ b/views/honkpage.js @@ -167,8 +167,10 @@ function relinklinks() { } els = document.getElementsByClassName("honkerlink") while (els.length) { - els[0].onclick = pageswitcher("honker", els[0].text) - els[0].classList.remove("honkerlink") + var el = els[0] + var xid = el.getAttribute("data-xid") + el.onclick = pageswitcher("honker", xid) + el.classList.remove("honkerlink") } } (function() {