EBonus.gg Video

Click the next video button automatically. With other cool features added.

目前為 2019-06-02 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         EBonus.gg Video
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Click the next video button automatically. With other cool features added.
// @author       CharlesCraft50
// @match        https://ebonus.gg/earn-coins/watch/*
// @grant        none
// @require      http://code.jquery.com/jquery-3.4.1.min.js

// ==/UserScript==

$(document).ready(function(){
    if($('label[for="CAPTCHA"]').length > 0) {
        alert("Captcha Alert");
    } else {
        //Start
        var coinsclicker = setInterval(function() {
            ClickNext();
            ClickOnBubble();
        }, 1000);
    }

    var removeElements = function(text, selector) {
        var wrapped = $("<div>" + text + "</div>");
        wrapped.find(selector).remove();
        return wrapped.html();
    }



    if(sessionStorage.getItem("coinGet") === null || sessionStorage.getItem("coinGet") == NaN || sessionStorage.getItem("coinGet") == "NaN") {
        var coinCount = 0;
    } else {
        coinCount = parseInt(sessionStorage.getItem("coinGet"));
    }

    if(sessionStorage.getItem("circleClick") === null || sessionStorage.getItem("circleClick") == NaN || sessionStorage.getItem("circleClick") == "NaN") {
        var circleClicked = 0;
    } else {
        circleClicked = parseInt(sessionStorage.getItem("circleClick"));
    }

    if(sessionStorage.getItem("coinsEarned") === null || sessionStorage.getItem("coinsEarned") == NaN || sessionStorage.getItem("coinsEarned") == "NaN") {
        var coinsEarn = 0;
        sessionStorage.setItem("coinsEarned", coinsEarn);
    } else {
        coinsEarn = parseInt(sessionStorage.getItem("coinsEarned"));
    }

    if($('label[for="CAPTCHA"]').length > 0) {
        console.log("Captcha Alert");
    } else {
        if($("#next-video-btn").html() == "Next Video [1/10]") {
            coinCount += 1;
            coinsEarn = parseInt(sessionStorage.getItem("coinsEarned")) + parseInt(removeElements($('a[href="#coins_per_video"]').html(), "i").replace(/to earn|coins!|\s/gi, ""));
            sessionStorage.setItem("coinGet", coinCount);
            sessionStorage.setItem("coinsEarned", coinsEarn);
            console.log("10 videos = " + coinCount);
        }
    }

    console.log("10 videos = " + coinCount);

    //Coins Earned:
    $("body").append("<div class='button offer-button' style='position: fixed; bottom: 0; right: 0; font-size: 20px;' title='(10 Videos) = "+coinCount+"'>Coins Earned: " + coinsEarn +" <div class='coin-image' style='width:16px;background-size:16px;height:16px;margin-bottom:-2px;'></div></div>");
    $("body").append("<div class='button offer-button' style='position: fixed; bottom: 45px; right: 0; font-size: 20px;'>Video "+$('a#next-video-btn').html().replace(/Next Video /gi, '')+": "+coinCount+"</div>");

    window.ClickNext = function(){
        if ($(".coins_popup.circle.adsbox").length > 0) {
            circleClicked += 1;
            sessionStorage.setItem("circleClick", circleClicked);
            console.log("circle clicked = " + circleClicked);
            $(".coins_popup.circle.adsbox").click();
            $('.coins_popup.circle.adsbox a').trigger('click');
        }
    };

    window.ClickOnBubble = function(){
        if ($(".sweet-alert.showSweetAlert.visible").length > 0) {
            console.log("videos clicked");
            $(".confirm").click();
            setTimeout(function(){window.location.href = 'https://ebonus.gg/earn-coins/watch/';}, 5000);
        }
    };
});