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

Version Path
ramaze-2023.01.06 examples/app/chat/public/js/chat.js
Pistos-ramaze-2009.04.08 examples/app/chat/public/js/chat.js
Pistos-ramaze-2009.06.12 examples/app/chat/public/js/chat.js
manveru-ramaze-2009.04.01 examples/app/chat/public/js/chat.js
manveru-ramaze-2009.04.08 examples/app/chat/public/js/chat.js
manveru-ramaze-2009.04.18 examples/app/chat/public/js/chat.js
manveru-ramaze-2009.04.22 examples/app/chat/public/js/chat.js
manveru-ramaze-2009.04 examples/app/chat/public/js/chat.js
manveru-ramaze-2009.05.08 examples/app/chat/public/js/chat.js
manveru-ramaze-2009.05 examples/app/chat/public/js/chat.js
manveru-ramaze-2009.06.04 examples/app/chat/public/js/chat.js
manveru-ramaze-2009.06.12 examples/app/chat/public/js/chat.js
manveru-ramaze-2009.06 examples/app/chat/public/js/chat.js
manveru-ramaze-2009.07 examples/app/chat/public/js/chat.js
rjspotter-ramaze-2009.06.29 examples/app/chat/public/js/chat.js
rjspotter-ramaze-2009.06.31 examples/app/chat/public/js/chat.js
ramaze-2012.12.08 examples/app/chat/public/js/chat.js
ramaze-2012.12.08b examples/app/chat/public/js/chat.js
ramaze-2012.04.14 examples/app/chat/public/js/chat.js
ramaze-2012.03.07 examples/app/chat/public/js/chat.js