Trambambaj

tankuj masowo wszystki floty

Feb 13th, 2021 (edited)
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. // ==UserScript==
  2. // @name tankuj masowo wszystkie floty
  3. // @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
  4. // @version 0.01
  5. // @include *hegira.com.pl/*
  6. // @copyright free
  7. // ==/UserScript==
  8. const listaFlot = document.getElementsByName("add_figters")[0][1];
  9. const ile = document.getElementsByName("add_figters")[0][1].length;
  10. $("h2:contains(' Rozkazy ogólne')").after(
  11. '<button type="button" id="zaladuj" title="Tankuj masowo.">Tankowanie masowe</button>'
  12. ),
  13. $("button#zaladuj").click(function () {
  14. for (let i = 0; i < ile; i++) {
  15. console.log(listaFlot[i].value);
  16. $.ajax({
  17. type: "POST",
  18. url: "blanc2.php",
  19. data: "load_fleet_acu=" + listaFlot[i].value + "&tank_kh=2&zaladuj=1",
  20. async: false,
  21. headers: {
  22. Accept:
  23. "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
  24. "Cache-Control": "max-age=0",
  25. "Content-Type": "application/x-www-form-urlencoded",
  26. },
  27. });
  28. $.ajax({
  29. type: "POST",
  30. url: "blanc2.php",
  31. data: "load_fleet_acu_prot=" + listaFlot[i].value + "&zaladuj=1",
  32. async: false,
  33. headers: {
  34. Accept:
  35. "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
  36. "Cache-Control": "max-age=0",
  37. "Content-Type": "application/x-www-form-urlencoded",
  38. },
  39. });
  40. }
  41. location.reload();
  42. });
  43.  
Add Comment
Please, Sign In to add comment