Last active
May 26, 2022 00:41
-
-
Save L3n1n/cdfd9e8973250daa8e83881c0c59f7c9 to your computer and use it in GitHub Desktop.
Fast Farm Steam Recomenations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Fast Farm Steam Recomenations | |
// @namespace https://gist.github.com/L3n1n | |
// @version 1.02 | |
// @description Fast Farm Steam Sale Cards | |
// @author L3n1n | |
// @match *://store.steampowered.com/explore* | |
// @match *://store.steampowered.com//explore* | |
// @grant none | |
// @updateURL https://gist.githubusercontent.com/L3n1n/cdfd9e8973250daa8e83881c0c59f7c9/raw/FastFarmSteamRecomenations.user.js | |
// @downloadURL https://gist.githubusercontent.com/L3n1n/cdfd9e8973250daa8e83881c0c59f7c9/raw/FastFarmSteamRecomenations.user.js | |
// ==/UserScript== | |
(function(){ | |
$J('.discovery_queue_apps h2').append('<span style="margin-left: 10px;" class="btnv6_lightblue_blue btn_medium" id="AutoFarmCard"><span>Get Card</span></span>'); | |
$J('#AutoFarmCard').on('click',function(){ | |
ViewList(); | |
$J('#AutoFarmCard span').text('Wait...'); | |
}); | |
})(); | |
var ViewList = function(){ | |
$J('#AutoFarmCard span').text('Loading...'); | |
jQuery.post( '//store.steampowered.com/explore/generatenewdiscoveryqueue', {sessionid: g_sessionID, queuetype: 0} ).done(function(data){ | |
var requests = []; | |
for ( var i = 0; i < data.queue.length; i++ ) | |
requests.push( jQuery.post( '//store.steampowered.com/app/'+data.queue[i], { appid_to_clear_from_queue: data.queue[i], sessionid: g_sessionID } ) ); | |
jQuery.when.apply(jQuery, requests).done(function(){ | |
$J('#AutoFarmCard span').text('Done! Reloading page...'); | |
setTimeout(function(){ | |
window.location.reload(); | |
}, 500); | |
}).fail(function(){ | |
ViewList(); | |
}); | |
}).fail(function(){ | |
ViewList(); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment