You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
448B

  1. // Generated by CoffeeScript 1.9.2
  2. (function() {
  3. var handle;
  4. handle = function(serp, status, resp) {
  5. var rendered, template;
  6. template = $('#template').html();
  7. Mustache.parse(template);
  8. rendered = Mustache.render(template, serp);
  9. return $("#serp").html(rendered);
  10. };
  11. window.search = function() {
  12. var q;
  13. q = $('#q').val();
  14. $.getJSON('/api', {
  15. q: q
  16. }, handle);
  17. return true;
  18. };
  19. }).call(this);