Steam, Badge Creator Automate

This script automatically craft badge if you have enough cards

目前為 2019-12-20 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Steam, Badge Creator Automate
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  This script automatically craft badge if you have enough cards
// @author       You
// @match        https://steamcommunity.com/id/*/badges/*
// @match        https://steamcommunity.com/id/*/gamecards/*/
// @grant        none
// @runat        document-end
// @nowrap
// ==/UserScript==

(function() {
    'use strict';
    var blacklist = [1195670];

    jQuery(function () {
        setTimeout(function () {
            var $craft = jQuery(".badge_craft_button");
            while ($craft.length > 0) {
                var isBlacklist = false;
                var button = Array.prototype.pop.call($craft);
                for (var i = 0; i < blacklist.length; i++) {
                    if ((button.href || button.onclick.toString() || "").indexOf(blacklist[i]) >= 0) {
                        isBlacklist = true;
                        break;
                    }
                }

                if (isBlacklist) continue;
                button.click();

                break;
            }

            if (location.pathname.indexOf("/gamecards/") >= 0) {
                setTimeout(function () {
                    jQuery(".profile_small_header_location").first().click();
                }, 1500);
            }
        }, 1500);
    });
})();

QingJ © 2025

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