crabrock

warfacts - send outside

Aug 5th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Send Outside
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  adds a button to send a fleet right outside a system
  6. // @author       You
  7. // @match        http://www.war-facts.com/fleet.php*
  8. // @grant        none
  9. // ==/UserScript==
  10. window.sendOutside = function(x,y,z) {
  11.     $('#xyz').val(x+', '+y+', '+z);
  12.     getMission('verify', 'c');
  13. }
  14. var coords=$('#midcolumn div').eq(20);
  15. var xyz=coords.text().split(', ');
  16. var x=xyz[0];
  17. var y=xyz[1];
  18. var z=xyz[2].split(' ');
  19. z=parseInt(z[0]);
  20. z=z+1;
  21. coords.append('<div style="display:inline-block;"><input type="button" value="send outside" onClick="sendOutside('+x+','+y+','+z+');"></div>');
  22. console.log(coords);
Advertisement
Add Comment
Please, Sign In to add comment