onlyfaucet.com

auto claim faucet

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

You will need to install an extension such as Tampermonkey to install this script.

Tendrás que instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Tendrás que instalar una extensión como Tampermonkey antes de poder instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Tendrás que instalar una extensión como Stylus antes de poder instalar este script.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

Para poder instalar esto tendrás que instalar primero una extensión de estilos de usuario.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

// ==UserScript==
// @name         onlyfaucet.com
// @namespace    only auto
// @version      0.55
// @description  auto claim faucet
// @author       gi2h
// @run-at       document-start
// @match        https://onlyfaucet.com/
// @match        https://onlyfaucet.com/faucet/currency/*
// @match        https://onlyfaucet.com/*
// @match        https://onlyfaucet.com/?r=12211
// @match        https://onlyfaucet.com/?r=
// @grant        none
// @license      MIT
// @icon         https://www.google.com/s2/favicons?sz=64&domain=freeltc.fun
// ==/UserScript==

setInterval(function() {
    let c = document.querySelector("#subbutt") || document.querySelector("body > div.faucet-div.cl > form > div > input[type=submit]");

    // Check if on a specific URL and click the button
    if (c) {
        c.scrollIntoView({ behavior: 'smooth', block: 'center' }); // Scroll to the button smoothly
        setTimeout(() => {
            c.click(); // Click the button after scrolling
        }, 300); // Wait for a brief moment before clicking
    }

    // Check for the modal containing the Shortlink message
    let m = document.querySelector("#swal2-html-container");
    if (m && m.innerText.includes('You must complete at least 1 Shortlink to continue.')) {
        location.href = 'https://onlyfaucet.com/links/go/93/LTC';
        return; // Exit the interval after redirection
    }

    // New logic for checking the URL and managing the query parameters
    const check_address = 'https://onlyfaucet.com'; // Base address for checking
    if (window.location.href == check_address ||
        window.location.href == (check_address + '/') ||
        window.location.href == (check_address + '/index.php')) {

        setTimeout(function() {
            if (location.search !== '?r=12211') {
                location.search = '?r=12211'; // Update the query string to include your referral
            }
        }, 2000);
    }

    if (location.search == '?r=12211') {
        setTimeout(function() {
            let button = document.querySelector('button[data-target="#login"]'); // Changed target to "login"
            if (button) {
                button.scrollIntoView({ behavior: 'smooth', block: 'center' }); // Scroll to the login button smoothly
                setTimeout(() => {
                    button.click(); // Click the login button after scrolling
                }, 300); // Wait for a brief moment before clicking
            }
            setTimeout(function() {
                window.location.reload(); // Reload the page after 60 seconds
            }, 60000);
        }, 3000);
    }

}, 9000);

// Function to remove ads
(function() {
    'use strict';
    // Monitor DOM changes to remove dynamic ads
    let observer = new MutationObserver(removeAds);
    observer.observe(document.body, { childList: true, subtree: true });

    // Common ad-related selectors
    const adSelectors = [
        'iframe', // Removes iframes (commonly used for ads)
        '.ad', // Class 'ad'
        '.adsbygoogle', // Google ads
        '[id^="ad"]', // IDs starting with 'ad'
        '[class*="ad"]', // Any class containing 'ad'
        '.banner', // Banner ads
        '.sponsor', // Sponsored ads
        '.popup', // Pop-up ads
        '.advertisement' // Elements with 'advertisement' class
    ];

    // Function to remove elements by selector
    function removeAds() {
        adSelectors.forEach(selector => {
            document.querySelectorAll(selector).forEach(adElement => adElement.remove());
        });
        console.log('Ads removed');
    }

    // Run the function initially
    removeAds();
})();

 (function() {
    // Define the BoostTimers function
    function BoostTimers() {
        const FsT = window.setTimeout;
        const FsI = window.setInterval;
        Object.defineProperty(window, 'setTimeout', {
            value: function(func, delay) {
                if (delay === 1000) { delay = 50; }
                return FsT.apply(this, arguments);
            }
        });
        Object.defineProperty(window, 'setInterval', {
            value: function(func, delay) {
                if (delay === 1000) { delay = 50; }
                return FsI.apply(this, arguments);
            }
        });
    }

    // Always apply BoostTimers
    BoostTimers();
})();