From 031daa32bbe11417d0dfb968dfbf888f0dc65d86 Mon Sep 17 00:00:00 2001 From: raylu Date: Sun, 20 Oct 2013 03:07:32 -0700 Subject: rewrite as api --- web/static/js/search.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 web/static/js/search.js (limited to 'web/static/js/search.js') diff --git a/web/static/js/search.js b/web/static/js/search.js new file mode 100644 index 0000000..faeb8fe --- /dev/null +++ b/web/static/js/search.js @@ -0,0 +1,11 @@ +window.addEvent('domready', function() { + ykill.api('/search' + document.location.search, function(results) { + var corps = $('corps'); + results.corporations.each(function(corp) { + corps.grab(new Element('a', { + 'html': corp.corporation_name, + 'href': '/corporation/' + corp.corporation_id, + })); + }); + }); +}); -- cgit v1.2.3