summaryrefslogtreecommitdiffstats
path: root/web/static/js/home.js
blob: 11e142205314a1736f3a964889560cc093469ede (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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', {'html': kill['system_name'] + ' (' + kill['security'].toFixed(1) + ')'}),
				new Element('td').grab(
					new Element('a', {
						'href': '/kill/' + kill['kill_id'],
						'html': ykill.format_billions(kill['cost'])
					})
				)
			));
		});
	});
});