Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name wezwij cern, habi
- // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
- // @version 1.1
- // @include *hegira.com.pl/*
- // @copyright free
- // ==/UserScript==
- $('button:contains("Wezwij stację klasy Cern (10 kkk erg)")')
- .parent()
- .append(
- '<input type="text" id = "polecern" size="3" title = "wpisz liczbę 1-50"><button type="button" id="wezwijc" title="Wezwij CERNy." >Wezwij</button>'
- );
- $('button:contains("Wezwij stację klasy Habitat(15 kkk erg)")')
- .parent()
- .append(
- '<input type="text" id = "polehabi" size="3" title = "wpisz cyfrę 1-3"><button type="button" id="wezwijh" title="Wezwij Habi." >Wezwij</button>'
- );
- $("button#wezwijc").click(function () {
- const mCern = document.getElementById("polecern").value;
- if (mCern > 50 || mCern % 1 !== 0 || mCern < 1) {
- window.alert("Podaj właściwą ilość(1-50)");
- return;
- } else {
- const potw = window.confirm(
- `Czy potwierdzasz wezwanie ${mCern} CERNów za ${mCern * 10} mld erg?`
- );
- if (potw === false) return;
- }
- for (let i = 0; i < mCern; i++) {
- $.ajax({
- type: "POST",
- url: "blanc2.php",
- data: "wezwij_pomoc=11&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();
- });
- $("button#wezwijh").click(function () {
- const mHabi = document.getElementById("polehabi").value;
- if (mHabi > 3 || mHabi % 1 !== 0 || mHabi < 1) {
- window.alert("Podaj właściwą ilość(1-3)");
- return;
- } else {
- const potw = window.confirm(
- `Czy potwierdzasz wezwanie ${mHabi} Habitatów za ${mHabi * 15} mld erg?`
- );
- if (potw === false) return;
- }
- for (let i = 0; i < mHabi; i++) {
- $.ajax({
- type: "POST",
- url: "blanc2.php",
- data: "wezwij_pomoc=10&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