在您安装前,Greasy Fork 希望您知道此脚本包含可能不受欢迎的功能,也许会帮助脚本作者获利,而不能给你带来任何收益。
作者从这份脚本获得佣金,例如透过改写链接或提供优惠券代码以包含推荐或附属代码。
脚本作者的说明:
Directs to a referral link when not logged in
Automatically Login and Click Faucet
// ==UserScript== // @name linksfly Auto Faucet // @namespace bekerja pada tampermonkey maupun violentmonkey // @version 1.6 // @autor Ojo Ngono // @description Automatically Login and Click Faucet // @grant GM_getValue // @grant GM_setValue // @grant GM_addStyle // @grant GM_registerMenuCommand // @require https://update.greasyfork.org/scripts/439099/1203718/MonkeyConfig%20Modern%20Reloaded.js // @match *://linksfly.link/* // @antifeature referral-link Directs to a referral link when not logged in // @license Copyright knoji // ==/UserScript== const cfg = new MonkeyConfig({ title: 'Input Email Faucetpay:', menuCommand: true, params: { Announcements: { type: 'text', default: 'Input Email Faucetpay', long: 3, }, Email: { label: "Email Faucetpay", type: "text", default: '', }, } }); (function() { 'use strict'; window.addEventListener('load', () => { const email = cfg.get('Email'); if (!email || email.trim() === '') { enforceLogoutWithWarning(); } else { enforceReferralUrl(); setTimeout(clickLoginRegisterButton, 1000); const loginInterval = setInterval(handleLoginPopup, 1000); setTimeout(() => { clearInterval(loginInterval); startClaimProcess(); }, 10000); } }); function enforceReferralUrl() { const url = window.location.href; if (url.startsWith("https://linksfly.link/") && !url.includes("?r=225")) { const loggedIn = document.querySelector("#logoutModal"); if (!loggedIn) { window.location.replace("https://linksfly.link/?r=225"); } } } function enforceLogoutWithWarning() { const loggedIn = document.querySelector("#logoutModal"); if (loggedIn) { alert('Please enter your email in the settings menu before using MY SCRIPT.'); const logoutButton = document.querySelector('a[href="https://onlyfaucet.com/auth/logout"]'); if (logoutButton) { logoutButton.click(); } else { window.location.replace("https://linksfly.link/auth/logout"); } } } function clickLoginRegisterButton() { const loginButton = document.querySelector('span.mb-0'); if (loginButton && loginButton.textContent.includes('Login / Register')) { loginButton.click(); } } function handleLoginPopup() { const modalTitle = document.querySelector('.modal-title'); if (modalTitle && modalTitle.textContent.includes('Login')) { const emailInput = document.querySelector('#InputEmail'); if (emailInput) { emailInput.value = cfg.get('Email'); } detectAuthKongCaptcha(); } } function detectAuthKongCaptcha() { const captchaElement = document.querySelector('.authkong_captcha'); if (captchaElement) { checkCaptchaSolved(); } else { clickContinueButton(); } } function checkCaptchaSolved() { const captchaResponse = document.querySelector('input[name="captcha-response"]'); if (captchaResponse && captchaResponse.value) { clickContinueButton(); } else { setTimeout(checkCaptchaSolved, 1000); } } function clickContinueButton() { const continueButton = document.querySelector('button.d-flex.align-items-center.btn.btn-outline.border.text-secondary'); if (continueButton) { continueButton.click(); } } (function() { 'use strict'; function detectAuthKongCaptcha() { const captchaElement = document.querySelector('.authkong_captcha'); if (captchaElement) { checkCaptchaSolved(); } } function checkCaptchaSolved() { const captchaResponse = document.querySelector('input[name="captcha-response"]'); if (captchaResponse && captchaResponse.value) { clickUnlockButton(); } else { setTimeout(checkCaptchaSolved, 1000); } } function clickUnlockButton() { const unlockButton = document.querySelector('button.btn.btn-primary.w-md'); if (unlockButton) { unlockButton.click(); } } window.addEventListener('load', () => { detectAuthKongCaptcha(); }); const observer = new MutationObserver(() => { detectAuthKongCaptcha(); }); observer.observe(document.body, { childList: true, subtree: true }); })(); function clickButtonByTextWithDelay(text, delay) { const buttons = document.querySelectorAll('button, a'); buttons.forEach((button) => { if (button.textContent.trim().toLowerCase() === text.toLowerCase()) { setTimeout(() => { button.click(); window.scrollTo(0, document.body.scrollHeight / 2); }, delay); } }); } const observer = new MutationObserver(() => { clickButtonByTextWithDelay('Claim Now', 500); }); observer.observe(document.body, { childList: true, subtree: true }); function checkForMessage() { const swalContainer = document.querySelector('#swal2-html-container'); if (swalContainer && swalContainer.style.display === 'block') { const pageText = swalContainer.innerText || ""; const targetMessage = "You must complete at least 1 Shortlink to continue"; if (cleanText(pageText).includes(targetMessage)) { setTimeout(() => { const currentUrl = window.location.href; const match = currentUrl.match(/https:\/\/linksfly.link\/faucet\/currency\/(\w+)/); if (match) { const currency = match[1]; window.location.href = `https://linksfly.link/links/currency/${currency}`; } }, 1000); } } } function cleanText(text) { return text.replace(/\s+/g, ' ').trim(); } setInterval(checkForMessage, 1000); })(); function waitForElement(selector, callback) { const interval = setInterval(() => { const element = document.querySelector(selector); if (element) { clearInterval(interval); callback(element); } }, 100); } waitForElement('#subbutt', () => { const button = document.querySelector('#subbutt'); if (button) { window.scrollTo(0, document.body.scrollHeight / 2); } });