Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name tankuj masowo wszystkie floty
- // @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
- // @version 0.01
- // @include *hegira.com.pl/*
- // @copyright free
- // ==/UserScript==
- const listaFlot = document.getElementsByName("add_figters")[0][1];
- const ile = document.getElementsByName("add_figters")[0][1].length;
- $("h2:contains(' Rozkazy ogólne')").after(
- '<button type="button" id="zaladuj" title="Tankuj masowo.">Tankowanie masowe</button>'
- ),
- $("button#zaladuj").click(function () {
- for (let i = 0; i < ile; i++) {
- console.log(listaFlot[i].value);
- $.ajax({
- type: "POST",
- url: "blanc2.php",
- data: "load_fleet_acu=" + listaFlot[i].value + "&tank_kh=2&zaladuj=1",
- async: false,
- headers: {
- Accept:
- "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
- "Cache-Control": "max-age=0",
- "Content-Type": "application/x-www-form-urlencoded",
- },
- });
- $.ajax({
- type: "POST",
- url: "blanc2.php",
- data: "load_fleet_acu_prot=" + listaFlot[i].value + "&zaladuj=1",
- async: false,
- headers: {
- Accept:
- "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
- "Cache-Control": "max-age=0",
- "Content-Type": "application/x-www-form-urlencoded",
- },
- });
- }
- location.reload();
- });
Add Comment
Please, Sign In to add comment