Trambambaj

Wezwij cern,habi

Feb 13th, 2021 (edited)
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. // ==UserScript==
  2. // @name wezwij cern, habi
  3. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
  4. // @version 1.1
  5. // @include *hegira.com.pl/*
  6. // @copyright free
  7. // ==/UserScript==
  8. $('button:contains("Wezwij stację klasy Cern (10 kkk erg)")')
  9. .parent()
  10. .append(
  11. '<input type="text" id = "polecern" size="3" title = "wpisz liczbę 1-50"><button type="button" id="wezwijc" title="Wezwij CERNy." >Wezwij</button>'
  12. );
  13. $('button:contains("Wezwij stację klasy Habitat(15 kkk erg)")')
  14. .parent()
  15. .append(
  16. '<input type="text" id = "polehabi" size="3" title = "wpisz cyfrę 1-3"><button type="button" id="wezwijh" title="Wezwij Habi." >Wezwij</button>'
  17. );
  18. $("button#wezwijc").click(function () {
  19. const mCern = document.getElementById("polecern").value;
  20. if (mCern > 50 || mCern % 1 !== 0 || mCern < 1) {
  21. window.alert("Podaj właściwą ilość(1-50)");
  22. return;
  23. } else {
  24. const potw = window.confirm(
  25. `Czy potwierdzasz wezwanie ${mCern} CERNów za ${mCern * 10} mld erg?`
  26. );
  27. if (potw === false) return;
  28. }
  29. for (let i = 0; i < mCern; i++) {
  30. $.ajax({
  31. type: "POST",
  32. url: "blanc2.php",
  33. data: "wezwij_pomoc=11&zaladuj=1",
  34. async: false,
  35. headers: {
  36. Accept:
  37. "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
  38. "Cache-Control": "max-age=0",
  39. "Content-Type": "application/x-www-form-urlencoded",
  40. },
  41. });
  42. }
  43. location.reload();
  44. });
  45. $("button#wezwijh").click(function () {
  46. const mHabi = document.getElementById("polehabi").value;
  47. if (mHabi > 3 || mHabi % 1 !== 0 || mHabi < 1) {
  48. window.alert("Podaj właściwą ilość(1-3)");
  49. return;
  50. } else {
  51. const potw = window.confirm(
  52. `Czy potwierdzasz wezwanie ${mHabi} Habitatów za ${mHabi * 15} mld erg?`
  53. );
  54. if (potw === false) return;
  55. }
  56. for (let i = 0; i < mHabi; i++) {
  57. $.ajax({
  58. type: "POST",
  59. url: "blanc2.php",
  60. data: "wezwij_pomoc=10&zaladuj=1",
  61. async: false,
  62. headers: {
  63. Accept:
  64. "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
  65. "Cache-Control": "max-age=0",
  66. "Content-Type": "application/x-www-form-urlencoded",
  67. },
  68. });
  69. }
  70. location.reload();
  71. });
  72.  
Add Comment
Please, Sign In to add comment