Greasy Fork

SteamCompanion AutoJoin

Auto join SteamCompanion

当前为 2016-02-14 提交的版本,查看 最新版本

// ==UserScript==
// @name         SteamCompanion AutoJoin
// @namespace    http://s3rxus.com
// @version      0.12
// @description  Auto join SteamCompanion
// @author       Sergio Susa
// @match        https://steamcompanion.com/gifts/*
// @grant        none
// @require    http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==

$(document).ready(function() {

    if ($(".points")[0].innerHTML < 10) {
     return;   
    }
    
    if(document.URL.indexOf("search") != -1 ) {

        var links = $(".giveaway-links");

        for(var x = 0 ; x < links.length ; x++ ) {
            
            if (links[x].style.opacity != "0.5") {
                console.log(links[x].href);
                window.open(links[x].href);
            }
        }
    } else {
        $("#enter-giveaway").click();
        setInterval(function(){
            window.close();
        }, 10000);
    }
});