Last active
December 18, 2015 10:49
-
-
Save rcreasey/5771371 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Fleet Commander</title> | |
| <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <table id="reactions" class="table table-striped table-bordered"> | |
| <caption><h3>Simple Reactions</h3></caption> | |
| <thead> | |
| <tr> | |
| <td>Icon</td> | |
| <td>Value</td> | |
| <td>Reaction</td> | |
| <td>Icon</td> | |
| <td>Value</td> | |
| <td>Component</td> | |
| <td>Icon</td> | |
| <td>Value</td> | |
| <td>Component</td> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| </tbody> | |
| </table> | |
| <script> | |
| $(document).ready(function() | |
| { | |
| var regions = { | |
| 'jita': {id: 10000002} | |
| }; | |
| var reactions = [ | |
| { | |
| name: 'Sulfuric Acid' | |
| , id: 16661 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Evaporite Deposits', id: 16635, icon: 'evap_deposits.png'} | |
| , {name: 'Atmospheric Gases', id: 16634, icon: 'atmos_gases.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Silicon Diborite' | |
| , id: 16658 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Evaporite Deposits', id: 16635, icon: 'evap_deposits.png'} | |
| , {name: 'Silicates', id: 16636, icon: 'silicates.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Ceramic Powder' | |
| , id: 16660 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Evaporite Deposits', id: 16635, icon: 'evap_deposits.png'} | |
| , {name: 'Silicates', id: 16636, icon: 'silicates.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Carbon Polymers' | |
| , id: 16659 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Hydrocarbons', id: 16633, icon: 'hydrocarbons.png'} | |
| , {name: 'Silicates', id: 16636, icon: 'silicates.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Titanium Chromide' | |
| , id: 16654 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Titanium', id: 16638, icon: 'titanium.png'} | |
| , {name: 'Chromium', id: 16641, icon: 'chromium.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Crystallite Alloy' | |
| , id: 16655 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Cadmium', id: 16643, icon: 'cadmium.png'} | |
| , {name: 'Cobalt', id: 16640, icon: 'cobalt.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Fernite Alloy' | |
| , id: 16656 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Vanadium', id: 16642, icon: 'vanadium.png'} | |
| , {name: 'Scandium', id: 16639, icon: 'scandium.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Rolled Tungsten Alloy' | |
| , id: 16657 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Platinum', id: 16644, icon: 'platinum.png'} | |
| , {name: 'Tungsten', id: 16637, icon: 'tungsten.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Platinum Technite' | |
| , id: 16662 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Technetium', id: 16649, icon: 'technetium.png'} | |
| , {name: 'Platinum', id: 16644, icon: 'platinum.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Caesarium Cadmide' | |
| , id: 16663 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Caesium', id: 16647, icon: 'caesium.png'} | |
| , {name: 'Cadmium', id: 16643, icon: 'cadmium.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Solerium' | |
| , id: 16664 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Caesium', id: 16647, icon: 'caesium.png'} | |
| , {name: 'Chromium', id: 16641, icon: 'chromium.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Hexite' | |
| , id: 16665 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Platinum', id: 16644, icon: 'platinum.png'} | |
| , {name: 'Chromium', id: 16641, icon: 'chromium.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Hyperflurite' | |
| , id: 16666 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Platinum', id: 16644, icon: 'platinum.png'} | |
| , {name: 'Chromium', id: 16641, icon: 'chromium.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Neo Mercurite' | |
| , id: 16667 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Neodymium', id: 16651, icon: 'neodymium.png'} | |
| , {name: 'Mercury', id: 16646, icon: 'mercury.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Dysporite' | |
| , id: 16668 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Cadmium', id: 16643, icon: 'cadmium.png'} | |
| , {name: 'Mercury', id: 16646, icon: 'mercury.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Ferrofluid' | |
| , id: 16669 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Cadmium', id: 16643, icon: 'cadmium.png'} | |
| , {name: 'Hafnium', id: 16648, icon: 'hafnium.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Thulium Hafnite' | |
| , id: 33336 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Thulium', id: 16653, icon: 'thulium.png'} | |
| , {name: 'Hafnium', id: 16648, icon: 'hafnium.png'} | |
| ] | |
| }, | |
| { | |
| name: 'Promethium Mercurite' | |
| , id: 33337 | |
| , icon: 'sreaction.png' | |
| , components: [ | |
| {name: 'Promethium', id: 16652, icon: 'promethium.png'} | |
| , {name: 'Mercury', id: 16646, icon: 'mercury.png'} | |
| ] | |
| } | |
| ]; | |
| var component_ids = $.map(reactions, function(reaction) { | |
| return $.map(reaction.components, function(component) { | |
| return component.id; | |
| }) | |
| }); | |
| component_ids = $.map(component_ids, function(component){ return "typeid=" + component} ).join('&'); | |
| reaction_ids = $.map(reactions, function(reaction) { return "typeid=" + reaction.id} ).join('&'); | |
| var type_ids = [reaction_ids, component_ids].join('&'); | |
| var data_url = 'http://api.eve-central.com/api/marketstat?' + 'regionlimit=' + regions['jita'].id + '&' + type_ids; | |
| $.ajax({ | |
| type: "GET", | |
| url: data_url, | |
| dataType: "xml", | |
| success: function(data) { | |
| $.each(reactions, function(index, reaction) { | |
| var reaction_value = $(data).find('evec_api > marketstat > type#'+ reaction.id +' > buy > max').text(); | |
| var sell = (reaction_value * 200).toFixed(2); | |
| var row = $('<tr>'); | |
| row.append( | |
| $('<td>').append( | |
| $('<img>') | |
| .attr('src', 'http://tarrif.net/eve/img/icons/' + reaction.icon) | |
| .attr('height', '32') | |
| .attr('width', '32') | |
| ) | |
| ); | |
| row.append( | |
| $('<td>').text( sell ) | |
| ); | |
| row.append( | |
| $('<td>').text(reaction.name) | |
| ); | |
| var buy = 0.0; | |
| $.each(reaction.components, function(index, component) { | |
| var component_value = $(data).find('evec_api > marketstat > type#'+ component.id +' > sell > max').text(); | |
| buy =+ (component_value * 100); | |
| row.append( | |
| $('<td>').append( | |
| $('<img>') | |
| .attr('src', 'http://tarrif.net/eve/img/icons/' + component.icon) | |
| .attr('height', '32') | |
| .attr('width', '32') | |
| ) | |
| ); | |
| row.append( | |
| $('<td>').append( (component_value * 100).toFixed(2) ) | |
| ); | |
| row.append( | |
| $('<td>').text(component.name) | |
| ); | |
| }); | |
| if ( sell > buy ) { | |
| row.attr('class', 'success'); | |
| } | |
| $('#reactions tbody').append( row ); | |
| }) | |
| } | |
| }); | |
| }); | |
| </script> | |
| </div> | |
| <script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> | |
| <script type="text/javascript"><!-- | |
| var jv=1.0; | |
| //--></script> | |
| <script type="text/javascript" language=Javascript1.1><!-- | |
| jv=1.1; | |
| //--></script> | |
| <script type="text/javascript" language=Javascript1.2><!-- | |
| jv=1.2; | |
| //--></script> | |
| <script type="text/javascript" language=Javascript1.3><!-- | |
| jv=1.3; | |
| //--></script> | |
| <script type="text/javascript" language=Javascript1.4><!-- | |
| jv=1.4; | |
| //--></script> | |
| <script type="text/javascript" ><!-- | |
| function SiteStats_2887(){ | |
| var t=new Date(); | |
| var o='o='+t.getTimezoneOffset()+';'; | |
| t=t.getTime(); | |
| var isNN4=(document.layers)?true:false; | |
| var isCSS=(document.all)?true:false; | |
| var t='t='+t+';'; | |
| var b='b='+(isCSS?(document.body.clientWidth+'x'+document.body.clientHeight):isNN4?(innerWidth+'x'+innerHeight):'')+';'; | |
| var s='s='+(isCSS||isNN4?(screen.width+'x'+screen.height):'')+';'; | |
| var c='c='+(isCSS||isNN4?screen.colorDepth :'')+';'; | |
| var j='j='+jv+';' | |
| var p='p='+escape(location.href)+';'; | |
| var r='r='+escape(document.referrer)+';'; | |
| var u='http://tarrif.net/cgi-bin/sitestats.gif?'+t+b+s+c+j+o+p+r; | |
| document.write('<img src='+u+' width=1 height=1 style="position:absolute">'); | |
| var f='var e=new Date();e=e.getTime();var I=new Image(1,1);I.src="'+u+'e="+e+";";'; | |
| window.onunload=new Function(f); | |
| setTimeout('alive_2887("'+u+'")',0x249F0); | |
| } | |
| function alive_2887(u){ | |
| var e=new Date();var I=new Image(1,1); I.src=u+'alive=1;t='+e.getTime(); setTimeout('alive_2887("'+u+'")',0x249F0); | |
| } | |
| SiteStats_2887(); | |
| //--></script><noscript><img src="http://tarrif.net/cgi-bin/sitestats.gif?p=http%3A%2F%2Ftarrif.net%2Feve%2Freactions3.html;r=-;" width=1 height=1 alt="sitestats"></noscript><script type="text/javascript"><!-- | |
| var jv=1.0; | |
| //--></script> | |
| <script type="text/javascript" language=Javascript1.1><!-- | |
| jv=1.1; | |
| //--></script> | |
| <script type="text/javascript" language=Javascript1.2><!-- | |
| jv=1.2; | |
| //--></script> | |
| <script type="text/javascript" language=Javascript1.3><!-- | |
| jv=1.3; | |
| //--></script> | |
| <script type="text/javascript" language=Javascript1.4><!-- | |
| jv=1.4; | |
| //--></script> | |
| <script type="text/javascript" ><!-- | |
| function SiteStats_1466(){ | |
| var t=new Date(); | |
| var o='o='+t.getTimezoneOffset()+';'; | |
| t=t.getTime(); | |
| var isNN4=(document.layers)?true:false; | |
| var isCSS=(document.all)?true:false; | |
| var t='t='+t+';'; | |
| var b='b='+(isCSS?(document.body.clientWidth+'x'+document.body.clientHeight):isNN4?(innerWidth+'x'+innerHeight):'')+';'; | |
| var s='s='+(isCSS||isNN4?(screen.width+'x'+screen.height):'')+';'; | |
| var c='c='+(isCSS||isNN4?screen.colorDepth :'')+';'; | |
| var j='j='+jv+';' | |
| var p='p='+escape(location.href)+';'; | |
| var r='r='+escape(document.referrer)+';'; | |
| var u='http://tarrif.net/cgi-bin/sitestats.gif?'+t+b+s+c+j+o+p+r; | |
| document.write('<img src='+u+' width=1 height=1 style="position:absolute">'); | |
| var f='var e=new Date();e=e.getTime();var I=new Image(1,1);I.src="'+u+'e="+e+";";'; | |
| window.onunload=new Function(f); | |
| setTimeout('alive_1466("'+u+'")',0x249F0); | |
| } | |
| function alive_1466(u){ | |
| var e=new Date();var I=new Image(1,1); I.src=u+'alive=1;t='+e.getTime(); setTimeout('alive_1466("'+u+'")',0x249F0); | |
| } | |
| SiteStats_1466(); | |
| //--></script><noscript><img src="http://tarrif.net/cgi-bin/sitestats.gif?p=http%3A%2F%2Ftarrif.net%2Feve%2Freactions3.html;r=-;" width=1 height=1 alt="sitestats"></noscript></body> | |
| </html> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@tariff The first draft of the simple reactions is done. Let me know what you think.