// ==UserScript== // @name Steam Blocked Helper // @name:zh-CN Steam队列锁区辅助 // @namespace https://store.steampowered.com/agecheck/app/* // @version 0.1 // @description Add action buttons to the blocked games and remove them from the queue // @description:zh-CN 为锁区的游戏添加按钮选项并从队列中移除 // @author wweeiiyyiinn // @match https://store.steampowered.com/agecheck/app/* // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; function add_buttons(appid){ function load_script(){ var gamejs = document.createElement('script'); gamejs.type = "text/javascript"; gamejs.src = "https://steamstore-a.akamaihd.net/public/javascript/game.js"; document.head.appendChild(gamejs); document.head.innerHTML += ''; document.head.innerHTML += ''; } function add_actions(){ function init() { if (window.InitQueueControls && document.getElementById('add_to_wishlist_area')){ window.InitQueueControls(Number(appid), Number(appid), 955560, '1_5_9_'); } else { setTimeout(init, 10); } } init(); } function add_elements(){ var box = document.getElementById('error_box'); box.style.paddingBottom = '0px'; var content = box.parentElement; var controlHTML = '
' var profileSrc = document.body.innerHTML.match(/(https:\/\/steamcommunity.com\/profiles\/\d+)\/?/)[1]; content.innerHTML += controlHTML.replace(/appid/g, appid).replace(/profileSrc/g, profileSrc); var headerImg = document.createElement('img'); headerImg.src = 'https://steamcdn-a.akamaihd.net/steam/apps/appid/header.jpg'.replace('appid', appid); content.appendChild(headerImg); } load_script(); add_elements(); add_actions(); } function remove_from_queue(appid){ window.jQuery.post("/app/7", { sessionid: window.g_sessionID, appid_to_clear_from_queue: appid }); } if (!document.title.match(/Steam/)){ var appid = location.href.match(/\/app\/(\d+)\//)[1]; remove_from_queue(appid); add_buttons(appid); } })();