自动领取各种Steam促销活动中的贴纸奖励(如果有)
< Feedback on 浏览Steam时自动领取Steam贴纸
这个不行了,推荐F12用这个:// ==UserScript==// @name Steam自动探索队列// @namespace https://keylol.com/t157861-1-1// @version 0.1// @description Steam节庆活动用脚本,自动探索3次队列。// @author baodongsun// @match https://store.steampowered.com/// @grant SteamCN// ==/UserScript== (function() { 'use strict'; // Your code here...})();(function _exec(){var appids, running = true, queueNumber, progressDialog = ShowAlertDialog('探索中', $J('
我一直在用没发现哪里有问题啊,毕竟目的就只是领贴纸,自动探索队列的,steamdb的扩展就自带,没必要造轮子
Sign in to post a reply.
这个不行了,推荐F12用这个:
// ==UserScript==
// @name Steam自动探索队列
// @namespace https://keylol.com/t157861-1-1
// @version 0.1
// @description Steam节庆活动用脚本,自动探索3次队列。
// @author baodongsun
// @match https://store.steampowered.com/
// @grant SteamCN
// ==/UserScript==
(function() {
'use strict';
// Your code here...
})();(function _exec(){
var appids,
running = true,
queueNumber,
progressDialog = ShowAlertDialog('探索中', $J('
function abort(){
running = false;
progressDialog.Dismiss();
}
function retry(){
abort();
ShowConfirmDialog('错误', '是否重试?', '重试', '放弃').done(_exec)
}
function clearApp(){
if(!running)
return;
showProgress();
var appid = appids.shift();
!appid ? generateQueue() : $J.post( appids.length ? '/app/' + appid : '/explore/next/', {sessionid: g_sessionID, appid_to_clear_from_queue: appid} ).done(clearApp).fail(retry);
}
function generateQueue(){
running && $J.post('/explore/generatenewdiscoveryqueue', {sessionid: g_sessionID, queuetype: 0}).done(beginQueue).fail(retry);
}
function beginQueue(){
if(!running)
return;
$J.get('/explore/').done(function(htmlText){
var cardInfo = htmlText.match(/
if( !cardInfo ){
abort();
ShowAlertDialog('完成','已完成全部3轮探索队列');
return;
}
var matchedAppids = htmlText.match(/0,\s+(\[.*\])/);
if( !matchedAppids ){
retry();
return;
}
appids = JSON.parse(matchedAppids[1]);
queueNumber = cardInfo[1];
appids.length == 0 ? generateQueue() : clearApp();
showProgress();
})
}
function showProgress(){
$J('#progressContainer').html( '
剩余' + queueNumber + '个待探索队列, 当前队列剩余' + appids.length + '个待探索游戏' );
}
beginQueue();
}())