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";