Ourinfo.top auto faucet

Automatically Login and Handle Faucet Pages

  1. // ==UserScript==
  2. // @name Ourinfo.top auto faucet
  3. // @namespace bekerja pada tampermonkey maupun violentmonkey
  4. // @version 0.5
  5. // @description Automatically Login and Handle Faucet Pages
  6. // @author Ojo Ngono
  7. // @grant GM_getValue
  8. // @grant GM_setValue
  9. // @grant GM_addStyle
  10. // @grant GM_registerMenuCommand
  11. // @require https://update.gf.qytechs.cn/scripts/439099/1203718/MonkeyConfig%20Modern%20Reloaded.js
  12. // @match https://ourinfo.top/*
  13. // @exclude https://ourinfo.top/auth/login*
  14. // @icon https://i.ibb.co.com/XJSPdz0/large.png
  15. // @license Copyright OjoNgono
  16. // @antifeature referral-link Directs to a referral link when not logged in
  17. // ==/UserScript==
  18.  
  19. (function () {
  20. 'use strict';
  21.  
  22. const cfg = new MonkeyConfig({
  23. title: 'Input Email Faucetpay:',
  24. menuCommand: true,
  25. params: {
  26. Email: {
  27. label: "Email Faucetpay",
  28. type: "text",
  29. default: ''
  30. },
  31. }
  32. });
  33.  
  34. window.addEventListener('load', () => {
  35. const email = cfg.get('Email').trim();
  36. if (!email) {
  37. enforceLogoutWithWarning();
  38. return;
  39. }
  40. if (!isValidEmail(email)) {
  41. alert('Invalid email address. Please check your configuration.');
  42. enforceLogoutWithWarning();
  43. return;
  44. }
  45. if (isLoggedIn()) {
  46. if (isFaucetPage()) {
  47. checkGoClaimButton();
  48. autoClickClaimButton();
  49. } else {
  50. window.location.replace("https://ourinfo.top/faucet/currency/doge");
  51. }
  52. } else {
  53. setTimeout(() => {
  54. enforceReferralUrl(() => {
  55. fillEmailField(email);
  56. setTimeout(() => {
  57. clickLoginButton();
  58. }, 2000);
  59. });
  60. }, 1000);
  61. }
  62. const currentCoin = window.location.href.includes("doge") ? "doge" : "ltc";
  63. redirectIfLimitReached(currentCoin);
  64. autoClickClaimButton();
  65. checkAndClickTryAgain();
  66. });
  67.  
  68. function isLoggedIn() {
  69. return !!document.querySelector('i.fas.fa-user-circle.fa-2x');
  70. }
  71.  
  72. function isValidEmail(email) {
  73. const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
  74. return emailRegex.test(email);
  75. }
  76.  
  77. function enforceLogoutWithWarning() {
  78. if (isLoggedIn()) {
  79. alert('Please enter your email in the settings menu before using MY SCRIPT.');
  80. const logoutButton = document.querySelector('a[href="https://ourinfo.top/auth/logout"]');
  81. if (logoutButton) {
  82. logoutButton.click();
  83. } else {
  84. window.location.replace("https://ourinfo.top/auth/logout");
  85. }
  86. }
  87. }
  88.  
  89. function enforceReferralUrl(callback) {
  90. if (!window.location.href.includes("?r=253")) {
  91. window.location.replace("https://ourinfo.top/?r=253");
  92. setTimeout(callback, 1000);
  93. } else {
  94. callback();
  95. }
  96. }
  97.  
  98. function fillEmailField(email) {
  99. const emailInput = document.querySelector('input[type="email"]');
  100. if (emailInput) {
  101. emailInput.value = email;
  102. emailInput.dispatchEvent(new Event('input', { bubbles: true }));
  103. }
  104. }
  105.  
  106. function clickLoginButton() {
  107. const loginButton = document.querySelector('button[type="submit"].btn-user');
  108. if (loginButton) loginButton.click();
  109. }
  110.  
  111. function isFaucetPage() {
  112. return window.location.href.includes("/faucet/currency/");
  113. }
  114.  
  115. function autoClickClaimButton() {
  116. const claimButton = document.getElementById('subbutt');
  117. if (claimButton && claimButton.classList.contains('btn-primary')) {
  118. setTimeout(() => {
  119. claimButton.click();
  120. }, 1000);
  121. }
  122. }
  123.  
  124. function checkGoClaimButton() {
  125. const goClaimButton = document.querySelector('h4.next-button a.btn.btn-primary');
  126. if (goClaimButton && goClaimButton.textContent.trim() === "Go Claim") {
  127. setTimeout(() => {
  128. window.location.reload();
  129. }, 1000);
  130. }
  131. }
  132.  
  133. function checkAndClickTryAgain() {
  134. const networkErrorMessage = document.querySelector('h2.title-xl-grad');
  135. const tryAgainButton = document.querySelector('.btn.btn-primary');
  136. if (networkErrorMessage && tryAgainButton && networkErrorMessage.textContent.trim() === "Network Error") {
  137. tryAgainButton.click();
  138. }
  139. }
  140.  
  141. const observer = new MutationObserver(() => {
  142. checkGoClaimButton();
  143. checkAndClickTryAgain();
  144. });
  145.  
  146. observer.observe(document.body, { childList: true, subtree: true });
  147.  
  148. function redirectIfLimitReached(coin) {
  149. if (!window.location.href.includes(`/faucet/currency/${coin}`)) return;
  150. setTimeout(() => {
  151. const alertMessage = document.querySelector('.alert.alert-danger.text-center');
  152. const swalPopup = document.querySelector('.swal2-popup.swal2-show');
  153. if (
  154. (alertMessage && alertMessage.textContent.includes("Daily claim limit for this coin reached")) ||
  155. (swalPopup && swalPopup.textContent.includes("The faucet does not have sufficient funds for this transaction."))
  156. ) {
  157. if (coin === "ltc") {
  158. return;
  159. }
  160. const nextCoin = coin === "doge" ? "ltc" : "doge";
  161. window.location.replace(`https://ourinfo.top/faucet/currency/${nextCoin}`);
  162. }
  163. }, 1000);
  164. }
  165.  
  166. function clickOkButtonAfterDelay() {
  167. const okButton = document.querySelector('.swal2-confirm');
  168. if (okButton) {
  169. setTimeout(() => {
  170. okButton.click();
  171. }, 2000);
  172. }
  173. }
  174.  
  175. clickOkButtonAfterDelay();
  176. })();
  177.  
  178. (function () {
  179. const adSelectors = [
  180.  
  181. '.ads',
  182. '.left-ads',
  183. '.right-ads',
  184.  
  185. ];
  186.  
  187. adSelectors.forEach(selector => {
  188. const elements = document.querySelectorAll(selector);
  189. elements.forEach(el => el.remove());
  190. });
  191.  
  192. const scriptsToBlock = [
  193. 'cryptocoinsad.com/ads',
  194. 'wpadmngr.com/static/adManager.js',
  195. 'penaikaucmu.net',
  196. 'shebudriftaiter.net/tag.min.js',
  197. 'a.pemsrv.com/popunder1000.js'
  198. ];
  199.  
  200. const observer = new MutationObserver(() => {
  201. adSelectors.forEach(selector => {
  202. const elements = document.querySelectorAll(selector);
  203. elements.forEach(el => el.remove());
  204. });
  205. });
  206.  
  207. observer.observe(document.body, { childList: true, subtree: true });
  208.  
  209. const originalCreateElement = document.createElement;
  210. document.createElement = function (tagName) {
  211. if (tagName === 'script') {
  212. const script = originalCreateElement.call(document, tagName);
  213. Object.defineProperty(script, 'src', {
  214. set(url) {
  215. if (!scriptsToBlock.some(blockedUrl => url.includes(blockedUrl))) {
  216. script.setAttribute('src', url);
  217. }
  218. }
  219. });
  220. return script;
  221. }
  222. return originalCreateElement.call(document, tagName);
  223. };
  224. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址