diff options
author | raylu <raylu@gridium.com> | 2013-10-22 22:22:26 -0700 |
---|---|---|
committer | raylu <raylu@gridium.com> | 2013-10-22 22:22:26 -0700 |
commit | 29d0528ec6ff9cf61af3bab2feb71dcb3625240a (patch) | |
tree | 74e0b143e576fee14a217f74e8cf414b70e75c40 /web/static/js/home.js | |
parent | 0dea8f430e4905da98d7009bdf111e0965fedd22 (diff) | |
download | ykill-29d0528ec6ff9cf61af3bab2feb71dcb3625240a.tar.xz |
most expensive kills on homepage
Diffstat (limited to 'web/static/js/home.js')
-rw-r--r-- | web/static/js/home.js | 17 |
1 files changed, 17 insertions, 0 deletions
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)) + }) + ) + )); + }); + }); +}); |