Advertisement
Trambambaj

Tankowanie wszystkich stacji

Feb 11th, 2021 (edited)
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. // ==UserScript==
  2. // @name tankowanieStacji
  3. // @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
  4. // @version 1.2
  5. // @include *hegira.com.pl/*
  6. // @copyright free
  7. // ==/UserScript==
  8. const listaStacji = document.getElementsByName("aku_st_up");
  9. const ile = listaStacji.length;
  10. if (ile > 0) {
  11. ($("h2:contains('Centrum Dowodzenia')")
  12. .after(
  13. '<button class="button_bez_tla" type="button" id="tankuj" title="Tankuj stacje z reaktorem poniżej 100%."><img src="img/heg_panel_flot/zaladuj.png"></button>'
  14. ),
  15. $("button#tankuj").click(function () {
  16. for (let i = 0; i < ile; i++) {
  17. $.ajax({
  18. type: "POST",
  19. url: "blank3.php",
  20. data:
  21. "menu=12&pod_menu=stacje&rozbudowa_stacji=" +
  22. listaStacji[i][0].value +
  23. "&odpal_reaktor=3",
  24. async: false,
  25. });
  26. }
  27. location.reload();
  28. }));
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement