Greasy Fork

Freebitco.in - Auto Faucet

Roll every hour and select highest BTC-Bonus when aviable + Play "All WoF" every 6 hour

目前为 2023-10-16 提交的版本。查看 最新版本

// ==UserScript==
// @name         Freebitco.in - Auto Faucet
// @namespace    https://greasyfork.org/users/1162863
// @version      1.4
// @description  Roll every hour and select highest BTC-Bonus when aviable + Play "All WoF" every 6 hour
// @author       Andrewblood
// @match        https://freebitco.in/?op=home
// @match        https://freebitco.in/static/html/wof/wof-premium.html
// @icon         https://www.google.com/s2/favicons?sz=64&domain=freebitco.in
// @require      http://code.jquery.com/jquery-latest.js
// @license      Copyright Andrewblood
// ==/UserScript==

(function() {
    'use strict';



    if (window.location.href.includes("home")){
        var body = $('body');

        var points = {};

        if ($('#free_play_form_button').is(':visible'))
            setTimeout(function(){ $('#free_play_form_button').click();},2000);
        if ($('.close-reveal-modal').is(':visible'))
            setTimeout(function(){ $('.close-reveal-modal').click(); },2000);

        var reward = {};
        reward.select = function() {
            reward.points = parseInt($('.user_reward_points').text().replace(',',""));
            reward.bonustime = {};
            if ($("#bonus_container_free_points").length != 0) {
                reward.bonustime.text = $('#bonus_span_free_points').text();
                reward.bonustime.hour = parseInt(reward.bonustime.text.split(":")[0]);
                reward.bonustime.min = parseInt(reward.bonustime.text.split(":")[1]);
                reward.bonustime.sec = parseInt(reward.bonustime.text.split(":")[2]);
                reward.bonustime.current = reward.bonustime.hour * 3600 + reward.bonustime.min * 60 + reward.bonustime.sec;
            } else
                reward.bonustime.current = 0;


            console.log(reward.bonustime.current);
            if ($('#bonus_span_fp_bonus').length === 0)
                if (reward.points >=1700)
                    RedeemRPProduct('fp_bonus_1000');
        };

        body.prepend(
            $('<div/>').attr('style',"position:fixed;bottom:0px;left:0;z-index:999;width:350px;background-color:black;color: white; text-align: left;")
            .append(
                $('<div/>').attr('id','autofaucet')
                .append($('<p/>').attr('style','text-decoration:underline;').text("Freebitco.in - Auto Faucet"))
                .append($('<p/>')
                        .append($('<p/>').text("Current Features:"))
                        .append($('<p/>').text("Auto Roll"))
                        .append($('<p/>').text("Auto Select Rewards"))
                        .append($('<p/>').text("(according to Highest BTC Bonus)"))
                       )
            )
        ).prepend($('<style/>')
                  .text("#autofaucet p { margin: 0; margin-left: 2px;  text-align: left; }")
                 );
        setTimeout(reward.select,1000);
        setInterval(reward.select,60000);
    }



    if (window.location.href.includes("https://freebitco.in/static/html/wof/wof-premium.html")) {
        $(document).ready(function() {
            setTimeout(function() {

                let buttons = document.querySelectorAll(".play-but");
                let playAllButton = Array.from(buttons).find(button => button.textContent.trim() === "PLAY ALL");

                if (playAllButton) {
                    let clickEvent = document.createEvent('MouseEvents');
                    clickEvent.initEvent('click', true, true);
                    playAllButton.dispatchEvent(clickEvent);
                }
                setTimeout(() => {
                    document.location.reload();
                }, 21600000);
            }, 4000);
        });
    }



})();