Advertisement
enissay

SteamQueue

Dec 21st, 2017
279
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Execute this on http://store.steampowered.com/explore/
  2. var GenerateQueue = function(queueNumber) {
  3.     console.log('Queue #' + ++queueNumber);
  4.  
  5.     jQuery.post('http://store.steampowered.com/explore/generatenewdiscoveryqueue', {
  6.         sessionid: g_sessionID,
  7.         queuetype: 0
  8.     }).done(function(data) {
  9.         var requests = [];
  10.  
  11.         for (var i = 0; i < data.queue.length; i++) {
  12.             requests.push(jQuery.post('http://store.steampowered.com/app/10', {
  13.                 appid_to_clear_from_queue: data.queue[i],
  14.                 sessionid: g_sessionID
  15.             }));
  16.         }
  17.  
  18.         jQuery.when.apply(jQuery, requests).done(function() {
  19.             if (queueNumber < 3) {
  20.                 GenerateQueue(queueNumber);
  21.             } else {
  22.                 window.location.reload();
  23.             }
  24.         });
  25.     });
  26. };
  27.  
  28. GenerateQueue(0);
Advertisement
RAW Paste Data Copied
Advertisement