From 29d0528ec6ff9cf61af3bab2feb71dcb3625240a Mon Sep 17 00:00:00 2001 From: raylu Date: Tue, 22 Oct 2013 22:22:26 -0700 Subject: most expensive kills on homepage --- web/static/js/home.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 web/static/js/home.js (limited to 'web/static/js') diff --git a/web/static/js/home.js b/web/static/js/home.js new file mode 100644 index 0000000..8bbe943 --- /dev/null +++ b/web/static/js/home.js @@ -0,0 +1,17 @@ +window.addEvent('domready', function() { + var table = $('expensive'); + ykill.api('/top/cost', function(kills) { + kills.each(function(kill) { + table.grab(new Element('tr').adopt( + new Element('td').grab(ykill.portrait(kill['ship_type_id'], kill['ship_name'], 'type', '_32.png')), + new Element('td', {'html': kill['ship_name']}), + new Element('td').grab( + new Element('a', { + 'href': '/kill/' + kill['kill_id'], + 'html': ykill.format_isk(kill['cost'] / (100 * 1000 * 1000 * 1000)) + }) + ) + )); + }); + }); +}); -- cgit v1.2.3