From a1574411aa344c6f65737980de00b1eb4b9e8529 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 27 Jan 2023 00:20:27 -0500 Subject: [PATCH] fixes for peekses --- docs/honk.5 | 3 +++ views/honkpage.js | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/honk.5 b/docs/honk.5 index 5879dcc..b15a96b 100644 --- a/docs/honk.5 +++ b/docs/honk.5 @@ -139,6 +139,9 @@ A 24 hour clock is assumed, unless am or pm are specified. The duration is optional and may be specified as XdYhZm for X days, Y hours, and Z minutes (1d12h would be a 36 hour event). .Pp +Clicking the pretty circle face will open the emu peeker to add in the +selection of emus. +.Pp When everything is at last ready to go, press the .Dq it's gonna be honked button. diff --git a/views/honkpage.js b/views/honkpage.js index 7c8b8e3..fec4881 100644 --- a/views/honkpage.js +++ b/views/honkpage.js @@ -446,16 +446,22 @@ function playit(elem, word, wordlist, xid) { module.addguesscontrols(elem, word, wordlist, xid) }) } -function addemu(data){ +function addemu(elem) { + const data = elem.alt const box = document.getElementById("honknoise"); box.value += data; } function loademus() { div = document.getElementById("emupicker") - request = new XMLHttpRequest(); + request = new XMLHttpRequest() request.open('GET', '/emus') - request.onload = function(){ + request.onload = function() { div.innerHTML = request.responseText + div.querySelectorAll(".emu").forEach(function(el) { + el.onclick = function() { + addemu(el) + } + }) } if (div.style.display === "none") { div.style.display = "block";