all repos — honk @ 6ecc669f4147dcebfa16cff95c06e8a47318435f

my fork of honk

clear update message on page switch
Ted Unangst tedu@tedunangst.com
Fri, 11 Oct 2019 01:01:15 -0400
commit

6ecc669f4147dcebfa16cff95c06e8a47318435f

parent

9c7e310ff2630d282c912c04e03be6004b76dae9

1 files changed, 8 insertions(+), 1 deletions(-)

jump to
M views/honkpage.jsviews/honkpage.js

@@ -108,6 +108,12 @@ args["xid"] = arg

} return args } +function refreshupdate(msg) { + var el = document.querySelector("#refreshbox p span") + if (el) { + el.innerHTML = msg + } +} function refreshhonks(btn) { btn.innerHTML = "refreshing" btn.disabled = true

@@ -118,7 +124,7 @@ get("/hydra?" + encode(args), function(xhr) {

var lenhonks = fillinhonks(xhr) btn.innerHTML = "refresh" btn.disabled = false - btn.parentElement.children[1].innerHTML = " " + lenhonks + " new" + refreshupdate(" " + lenhonks + " new") }) } function statechanger(evt) {

@@ -159,6 +165,7 @@ honksonpage.prepend(document.createElement("div"))

var args = hydrargs() get("/hydra?" + encode(args), fillinhonks) } + refreshupdate("") } function newpagestate(name, arg) { return { "name": name, "arg": arg }