!7 // This gets around a bug in some screenreader + browser combos where on addition of a new message to the chat, the whole chat history is read. html { bool show = eq("1", params.get("show")); ret (show ? "" : hcss([[ #screenreadertrick { position: absolute !important; /* Outside the DOM flow */ height: 1px; width: 1px; /* Nearly collapsed */ overflow: hidden; clip: rect(1px 1px 1px 1px); /* IE 7+ only support clip without commas */ clip: rect(1px, 1px, 1px, 1px); /* All other browsers */ } ]])) + hdiv("", "aria-live" := "polite", "aria-atomic" := "true", "aria-relevant" := "all", id := "screenreadertrick") + "Screenreader should now give you the current time in seconds every 10 seconds." + loadJQuery() + hscript([[ function doIt() { var text = new Date().getSeconds() + " seconds"; console.log(text); $("#screenreadertrick").html(text); } setInterval(doIt, 5000); ]]); }