Steam Queue Clicker

Process your Steam Discovery Queue automatically

As of 27.12.2016. See ბოლო ვერსია.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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();