Greasy Fork is available in English.

twitch自動點擊獎勵

自動點擊50獎勵

Stan na 02-04-2020. Zobacz najnowsza wersja.

// ==UserScript==
// @name         twitch自動點擊獎勵
// @namespace    http://tampermonkey.net/
// @version      2.4
// @description  自動點擊50獎勵
// @author       聖冰如焰
// @match        https://www.twitch.tv/*
// @grant        none
// ==/UserScript==

let style = document.createElement("style");
style.textContent = `
.self{
    padding : 0 10px 0 10px;
    align-items: center!important;
    position: relative;
}
.self:hover{
    background-color: rgba(0,0,0,.05);
}
.self::before{
    content: '';
}
.self:hover::before{
    content: '自動領取獎勵數';
    user-select: none;
    background-color: #040109;
    border-radius: 4px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    right: 0;
    line-height: 1.2;
    padding: 3px 6px;
    padding-top: 3px;
    padding-right: 6px;
    padding-bottom: 3px;
    padding-left: 6px;
    pointer-events: none;
    position: absolute;
    text-align: left;
    user-select: none;
    white-space: nowrap;
    z-index: 2000;
    top: 50%;
    transform: translate(110%,-50%);
}
`;
let bool = true;
let get_coin = 0;
let x = document.cookie.split(" ").map(e=>{return e.split("=")});
x.forEach(e => {
    if (e[0] == "gift"){
        get_coin = e[1];
        bool = false;
        return false;
    }
});
if (bool) document.cookie = "gift=0;";
document.head.append(style);
let button = document.createElement("button");
button.className = "self";
let timeout = 50;
(function get_coins(){
    timeout = 50;
    if (document.getElementsByClassName("tw-flex tw-flex-row").length == 3 && document.getElementsByClassName("self").length == 0){
        button.textContent = get_coin;
        document.getElementsByClassName("tw-flex tw-flex-row")[1].after(button);
    }
    if(document.getElementsByClassName("tw-button tw-button--success tw-interactive")[0] != undefined){
        document.getElementsByClassName("tw-button tw-button--success tw-interactive")[0].click();
        get_coin += 50;
        button.textContent = get_coin;
        document.cookie = `gift=${get_coin};`
        timeout = 60000;
        console.log(new Date,get_coin);
    }
    setTimeout(get_coins,timeout)
})()