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-2011.12.28 examples/app/chat/public/js/chat.js
ramaze-2011.10.23 examples/app/chat/public/js/chat.js
ramaze-2011.07.25 examples/app/chat/public/js/chat.js
ramaze-2011.01.30 examples/app/chat/public/js/chat.js
ramaze-2011.01 examples/app/chat/public/js/chat.js
ramaze-2010.06.18 examples/app/chat/public/js/chat.js
ramaze-2010.04.04 examples/app/chat/public/js/chat.js
ramaze-2010.04 examples/app/chat/public/js/chat.js
ramaze-2010.03 examples/app/chat/public/js/chat.js
ramaze-2010.01 examples/app/chat/public/js/chat.js
ramaze-2009.10 examples/app/chat/public/js/chat.js
ramaze-2009.07 examples/app/chat/public/js/chat.js
ramaze-2009.04 examples/app/chat/public/js/chat.js
ramaze-2009.05 examples/app/chat/public/js/chat.js
ramaze-2009.06.12 examples/app/chat/public/js/chat.js
ramaze-2009.06.04 examples/app/chat/public/js/chat.js
ramaze-2009.06 examples/app/chat/public/js/chat.js