Greasy Fork

Greasy Fork is available in English.

Steam :: Badge - Remaining Card Drops

Adds a button to show badges with remaining card drops.

当前为 2020-02-26 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Steam :: Badge - Remaining Card Drops
// @namespace    https://steamcommunity.com/profiles/76561198018758253
// @version      0.2
// @description  Adds a button to show badges with remaining card drops.
// @author       Cold'er
// @match        *://steamcommunity.com/id/*/badges*
// @match        *://steamcommunity.com/profiles/*/badges*
// @icon         http://images.akamai.steamusercontent.com/ugc/320125633619822962/F71892F1DC4A1FE41FA782CFDA572F099FB6603F/
// @require      https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js
// @grant        none
// ==/UserScript==
'use strict';

// Text
var text = document.createElement('span');
text.appendChild(document.createTextNode('Toggle Badges With Remaining Drops'));

// Button
var button = document.createElement('button');
button.className = 'btnv6_blue_hoverfade btn_show_card_badges btn_medium'; // You can replace 'btn_medium'
// Steam store button styles I discovered: btn_medium, btn_small, btn_small_tall, app_tag
button.style.float = 'left';
button.style.margin = '-31px 200px 0px';
button.appendChild(text);
// Function, thanks to http://stackoverflow.com/a/6940628
button.onclick = function() {
$(".badge_row").each(function()
{
    if($(this).children(".badge_row_inner").children(".badge_title_row").children(".badge_title_stats").children(".badge_title_playgame").length == 0)
    {
        $(this).toggle();
    }
});
}

// Append
document.getElementsByClassName('profile_badges_header')[0].appendChild(button);