Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name tankowanieStacji
- // @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
- // @version 1.2
- // @include *hegira.com.pl/*
- // @copyright free
- // ==/UserScript==
- const listaStacji = document.getElementsByName("aku_st_up");
- const ile = listaStacji.length;
- if (ile > 0) {
- ($("h2:contains('Centrum Dowodzenia')")
- .after(
- '<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>'
- ),
- $("button#tankuj").click(function () {
- for (let i = 0; i < ile; i++) {
- $.ajax({
- type: "POST",
- url: "blank3.php",
- data:
- "menu=12&pod_menu=stacje&rozbudowa_stacji=" +
- listaStacji[i][0].value +
- "&odpal_reaktor=3",
- async: false,
- });
- }
- location.reload();
- }));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement