Greasy Fork

Greasy Fork is available in English.

steam探索队列

try to take over the world!

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         steam探索队列
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  try to take over the world!
// @author       You
// @match        http://store.steampowered.com/app/*
// @match        http://store.steampowered.com/explore/
// @grant        none
// ==/UserScript==

(function() {
    var Count = 0;
    var NextGameDelay = 1500;  //下一个游戏的延迟
    
    setInterval(function(){
        if(++Count >= 3){
            Count = 0;
            var StartBtn = document.getElementsByClassName("btn_green_white_innerfade btn_medium");
            if(StartBtn[0]){
                StartBtn[0].click();
            }
        }
    }, 1000);
    
    var NewQueue = document.getElementById("refresh_queue_btn");
    if(NewQueue){
        var SubText = document.getElementsByClassName("subtext");
        if(SubText[0]){
            for(var i = 0; SubText[i]; i++){
                var StrMatch = SubText[i].innerHTML.match("明日再来");
                if(!StrMatch){
                    ShowConfirmDialog('提示', '是否开始进行探索队列(3秒后自动确认)!', '是', '否').done(function StartNewQueue() {NewQueue.click();});
                }
                else{
                    alert("今日探索队列已无卡牌掉落!");
                }
            }
            
        }
    }
    
    GoToNextGame(NextGameDelay);
    
    function GoToNextGame (Delay)
    {
        window.setTimeout(function() { 
            var NextGame = document.getElementsByClassName("btn_next_in_queue btn_next_in_queue_trigger");
            if(NextGame[0]){
                NextGame[0].click();
            }},
            Delay);
    }
})();