all repos — honk @ f4dfcdab9c53f717fe01aeba72ebd89a4e67b1c6

my fork of honk

need to add this
Ted Unangst tedu@tedunangst.com
Fri, 27 Jan 2023 12:39:17 -0500
commit

f4dfcdab9c53f717fe01aeba72ebd89a4e67b1c6

parent

2899cc68d01ab80647eda61a2aa58d22b6f243d1

1 files changed, 25 insertions(+), 0 deletions(-)

jump to
A views/misc.js

@@ -0,0 +1,25 @@

+function expandstuff() { + var els = document.querySelectorAll(".honk details") + for (var i = 0; i < els.length; i++) { + els[i].open = true + } +} + +function updatedonker(el) { + el = el.parentElement + el.children[1].textContent = el.children[0].value.slice(-20) +} + +(function() { + var expand = document.querySelector("button.expand") + if (expand) { + expand.onclick = expandstuff + } + + var donk = document.querySelector("#donker input") + if (donk) { + donk.onchange = function() { + updatedonker(this); + } + } +})()