Last active
June 21, 2024 16:13
-
-
Save xPaw/73f8ae2031b4e528abf7 to your computer and use it in GitHub Desktop.
⚠ This script has been integrated into SteamDB browser extension!
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 Steam Queue Auto Discoverer | |
// @description Discover the Steam queue three times to get the sale cards | |
// @version 2.3.0 | |
// @namespace https://gist.github.com/xPaw/73f8ae2031b4e528abf7 | |
// @icon https://store.steampowered.com/favicon.ico | |
// @match https://store.steampowered.com/explore* | |
// @grant none | |
// ==/UserScript== | |
var DiscoveryQueueModal, GenerateQueue = function( queueNumber ) | |
{ | |
if( DiscoveryQueueModal ) | |
{ | |
DiscoveryQueueModal.Dismiss(); | |
} | |
DiscoveryQueueModal = ShowBlockingWaitDialog( 'Generating the queue...', 'Generating new discovery queue #' + ++queueNumber ); | |
jQuery.post( 'https://store.steampowered.com/explore/generatenewdiscoveryqueue', { sessionid: g_sessionID, queuetype: 0 } ).done( function( data ) | |
{ | |
var requests = [], done = 0, errorShown; | |
for( var i = 0; i < data.queue.length; i++ ) | |
{ | |
var request = jQuery.post( 'https://store.steampowered.com/app/10', { appid_to_clear_from_queue: data.queue[ i ], sessionid: g_sessionID } ); | |
request.done( function() | |
{ | |
if( errorShown ) | |
{ | |
return; | |
} | |
DiscoveryQueueModal.Dismiss(); | |
DiscoveryQueueModal = ShowBlockingWaitDialog( 'Exploring the queue...', 'Request ' + ++done + ' of ' + data.queue.length ); | |
} ); | |
request.fail( function() | |
{ | |
if( errorShown ) | |
{ | |
return; | |
} | |
errorShown = true; | |
DiscoveryQueueModal.Dismiss(); | |
DiscoveryQueueModal = ShowBlockingWaitDialog( 'Error', 'Failed to clear queue item #' + ++done + '. Will try again soon.' ); | |
} ); | |
requests.push( request ); | |
} | |
var callback = function() | |
{ | |
DiscoveryQueueModal.Dismiss(); | |
if( queueNumber < 3 ) | |
{ | |
GenerateQueue( queueNumber ); | |
} | |
else | |
{ | |
DiscoveryQueueModal = ShowConfirmDialog( 'Done', 'Queue has been explored ' + queueNumber + ' times', 'Reload the page' ).done( function() { | |
ShowBlockingWaitDialog( 'Reloading the page' ); | |
window.location.reload(); | |
}); | |
} | |
}; | |
jQuery.when.apply( jQuery, requests ).then( callback, callback ); | |
} ).fail( function() | |
{ | |
setTimeout( () => GenerateQueue( queueNumber - 1 ), 1000 ); | |
DiscoveryQueueModal.Dismiss(); | |
DiscoveryQueueModal = ShowBlockingWaitDialog( 'Error', 'Failed to generate new queue #' + queueNumber + '. Trying again in a second.' ); | |
} ); | |
}; | |
var buttonContainer = document.createElement( 'div' ); | |
buttonContainer.className = 'discovery_queue_customize_ctn'; | |
buttonContainer.innerHTML = '<div class="btnv6_blue_hoverfade btn_medium" id="js-cheat-queue"><span>Cheat the queue</span></div><span>Discover the queue three times to get the sale cards</span>'; | |
var container = document.querySelector( '.discovery_queue_customize_ctn' ); | |
container.parentNode.insertBefore( buttonContainer, container ); | |
var button = document.getElementById( 'js-cheat-queue' ); | |
button.addEventListener( 'click', function( ) | |
{ | |
GenerateQueue( 0 ); | |
container.parentNode.removeChild( buttonContainer ); | |
}, false ); |
use this instead https://github.com/PotcFdk/SteamDiscoveryQueueAutoSkipper
Still working for me, gg
Ya still working, <3
Great code! Is it possible to include a line at the top that shows instructions? I'm not familiar with coding so it took me a while to piece together the information from comments from here and reddit. Just 3 lines of instructions such as
- Be on the Explore page in browser
- Press Ctrl + Shift + J
- Paste this code and hit enter
- The button "Start queue" will change to "Cheat queue". Click it.
That's all.
Is there any way to disable this feature? Just like there are many options to disable other features, I'd like to see an option to disable this.
The link to the Explore page is https://store.steampowered.com/explore/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
not working :((((((((((((((( tampermonkey/greasemonkey