faucetoshi.com

Walk through all PTC

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         faucetoshi.com
// @description  Walk through all PTC
// @version      1.1
// @author       WXC
// @match        https://faucetoshi.com/ptc*
// @grant        none
// @require      https://code.jquery.com/jquery-latest.min.js
// @grant        unsafeWindow
// @run-at document-idle
// @noframes
// @namespace https://greatest.deepsurf.us/users/713625
// ==/UserScript==


(function() {
    'use strict';

    setInterval(function() { window.focus(); }, 500);
    document.hasFocus = function () {return true;};


    var $ = window.jQuery;
    $.noConflict();
    $(document).ready(function() {

        setTimeout( function() {

            // PTC solve
            if( location.href.indexOf("/ptc/view") > -1 ) {


                var check_ptc = setInterval( function() {

                    if( $("#verify").is(":visible") ) {

                        clearInterval( check_ptc );



                        if( $(".h-captcha").is(":visible") ) {

                            document.title = "CAPTCHA!";

                            // check response
                            var h_timer = setInterval( function() {

                                if( $("[id^=h-captcha-response]").val().length > 32 ) {

                                    clearInterval( h_timer );
                                    $("form:first").submit();

                                }

                            }, 3000 );

                        }


                    }

                }, 2000 );

            }
            // PTC list
            else if( location.href.indexOf("/ptc") > 0 ) {

                if( $("button.btn:contains('Go')").is(":visible") ) {
                    $('.btn-primary:first').click();
                }

            }
            else {}


        }, ( 3 * 1000 ) );

    });


    // global reload
    setTimeout( function() {
        location.href = location.href;
    }, ( 90 * 1000 ) );


})();