Steam Queue Clicker

Process your Steam Discovery Queue automatically

当前为 2016-12-27 提交的版本,查看 最新版本

// ==UserScript==
// @name         Steam Queue Clicker
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Process your Steam Discovery Queue automatically
// @author       RaikoZA
// @match        http://store.steampowered.com
// @grant        none
// ==/UserScript==

function RunQueue() {

    var come_back = "Come back tomorrow to earn more cards by browsing your Discovery Queue!";
    var queue_empty = "You have viewed all the products";
    var next_in_queue = ClassElement("next_in_queue_content");
    var age_verify_skip = ClassElement("btnv6_blue_hoverfade btn_small btn_next_in_queue_trigger");
    var age_skip = ClassElement("btnv6_blue_hoverfade btn_small");
    var start_new_queue = ClassElement("next_in_queue_content");
    var begin_exploring = ClassElement("begin_exploring");
    var start_queue = ClassElement("btnv6_lightblue_blue btn_medium");
    var stop_queue = ClassElement("subtext");
    var discover_queue_empty = ClassElement("discover_queue_empty");

    var time = new Date();
    var get_time = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds();

    function ClassElement(name) {
        return document.getElementsByClassName(name)[0];
    }

    function CheckTime() {
        if (get_time > "18:00:00") {
            console.log("Time is greater than 6PM, running script");
            RunClicks();
        } else {
            console.log("Script will only run from 6PM onwards");
        }
    }
    function CheckQueue(){
        console.log("Checking queue");
        if (document.getElementsByClassName(queue_empty)){
            console.log("Your queue is empty, come back tomorrow");
        }else {
            CheckTime();
        }
    }
    CheckQueue();

    function RunClicks() {
        if (typeof stop_queue !== "undefined" && stop_queue.innerHTML === come_back) {
            console.log("All cards received today, come back tomorrow!");
        } else if (next_in_queue) {
            next_in_queue.click();
            console.log("Next item in the queue");
        } else if (age_verify_skip) {
            age_verify_skip.click();
            console.log("Skipping age verification");
        } else if (start_new_queue) {
            start_new_queue.click();
            console.log("Starting new queue");
        } else if (begin_exploring) {
            begin_exploring.click();
            console.log("Exploring has begun");
        } else if (start_queue) {
            start_queue.click();
            console.log("Starting new queue");
        } else if (age_skip) {
            age_skip.click();
            console.log("Skipping age verification");
        } else if (typeof stop_queue === "undefined") {
            console.log("Undefined");
        }
    }
}

RunQueue();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址