need to add this

This commit is contained in:
Ted Unangst 2023-01-27 12:39:17 -05:00
parent 6957a4d950
commit 84312b409c
1 changed files with 25 additions and 0 deletions

25
views/misc.js Normal file
View File

@ -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);
}
}
})()