can't use shortened form for honker links
Ted Unangst tedu@tedunangst.com
Fri, 04 Oct 2019 02:32:44 -0400
2 files changed,
5 insertions(+),
3 deletions(-)
M
views/honk.html
→
views/honk.html
@@ -8,7 +8,7 @@ <img alt="" src="/a?a={{ .Oonker}}">
{{ end }} <p> {{ if $bonkcsrf }} -<a class="honkerlink" href="/h?xid={{ .Honker }}">{{ .Username }}</a> +<a class="honkerlink" href="/h?xid={{ .Honker }}" data-xid="{{ .Honker }}">{{ .Username }}</a> {{ else }} <a href="{{ .Honker }}" rel=noreferrer>{{ .Username }}</a> {{ end }}
M
views/honkpage.js
→
views/honkpage.js
@@ -167,8 +167,10 @@ els[0].classList.remove("combolink")
} 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() {