faucetoshi.com

Walk through all PTC

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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 ) );


})();