Sha256: 0416fbf893796d1dd3ec59b94e2f3542469aedcb5eac3d957cf35ca6a49e3acc
Contents?: true
Size: 488 Bytes
Versions: 37
Compression:
Stored size: 488 Bytes
Contents
(function () { function say() { var input = $('input#talk')[0], text = encodeURIComponent(input.value); if (text) { $.post('/say', 'text=' + text, update, 'text/plain'); } input.value = ''; return false; } function update() { $('#main').load('/listen') } function poll() { update(); setTimeout(poll, 1000.0); } $('body').ready(function () { $('#chat').submit(say); $('input#talk').focus(); poll(); }); })();
Version data entries
37 entries across 37 versions & 4 rubygems