Trambambaj

kompleksowe wysyłanie na kompleksowe badanie gatunków

Feb 11th, 2021 (edited)
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name       kompleksowo gatunki
  3. // @require    http://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. 0 < $('button:contains("Kompleksowo")').length &&
  9.   ($("[name='nazwa_robala']")
  10.     .parent()
  11.     .after(
  12.       '<br /><br/><button type="button" id="komple" title="Badaj każdy z typów kompleksowo.">Kompleksowo kompleksowe</button>'
  13.     ),
  14.   $("button#komple").click(function () {
  15.     const czy = window.confirm(
  16.       "Czy potwierdzasz kompleksowe badanie gatunków?"
  17.     );
  18.     if (!czy) return;
  19.     const idList = [1, 2, 3, 4, 5, 6, 7, 8];
  20.     const liList = [0, -1, -4, -5, -6];
  21.     for (const li of liList) {
  22.       for (const id of idList) {
  23.         if (li < -1 && id === 8) continue;
  24.         $.ajax({
  25.           type: "POST",
  26.           url: "blanc2.php",
  27.           data: `menu=111&tech=local_life&s_id=-999&li_id=${li}&ilu=365500&eko_id=${id}&zaladuj=1`,
  28.           async: false,
  29.         });
  30.       }
  31.     }
  32.     location.reload();
  33.   }));
  34.  
Add Comment
Please, Sign In to add comment