mirror of
https://github.com/amark/gun.git
synced 2025-09-13 04:50:11 +00:00
21 lines
604 B
HTML
21 lines
604 B
HTML
<!DOCTYPE html>
|
|
<style>html, body, textarea { width: 100%; height: 100%; padding: 0; margin: 0; }</style>
|
|
<ul id='list'></ul>
|
|
<form id='form'>
|
|
<input id='who' placeholder='name'>
|
|
<input id='what' placeholder='say'>
|
|
<input type='submit' value='send'>
|
|
</form>
|
|
<script src="../../../gun/src/book.js"></script>
|
|
<script src="../../../gun/rad.js"></script><script>
|
|
search = setTimeout.RAD();
|
|
|
|
form.onsubmit = (eve)=>{
|
|
search(+new Date, (who.value+') '+what.value));
|
|
eve.preventDefault(what.value = "");
|
|
}
|
|
|
|
setInterval(async ()=>{
|
|
list.innerText = await search(+new Date).results();
|
|
},99);
|
|
</script> |