Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 22 additions & 15 deletions steam-auto-queue.user.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,37 @@
// ==UserScript==
// @name Steam Auto Queue
// @namespace https://github.com/FiveElementNinja/Steam-Auto-Queue/
// @version 1.0
// @version 1.7
// @description This script will automatically click through your discovery queue so you can get a sale card.
// @author Five Element Ninja (Twitter: @FivElementNinja)
// @match *://store.steampowered.com/app/*
// @match *://store.steampowered.com/agecheck/*
// @updateURL https://raw.githubusercontent.com/FiveElementNinja/Steam-Auto-Queue/master/steam-auto-queue.user.js
// @downloadURL https://raw.githubusercontent.com/FiveElementNinja/Steam-Auto-Queue/master/steam-auto-queue.user.js
// @grant none
// ==/UserScript==
/* jshint -W097 */

(function() {
'use strict';

console.log('Steam Auto Queue Loaded - Will try to click Next automatically...');

'use strict';
console.log('Steam Auto Queue Loaded - Will try to click Next automatically...');
try {
if (window.location.pathname.indexOf('/agecheck') > -1) {
var appid = window.location.pathname.replace('/agecheck', '').replace('/app/', '');
HideAgeGate(appid);
} else {
$J('#next_in_queue_form').submit();
}
}
catch(err) {
console.log('Error clicking next.');
if (window.location.pathname.indexOf('/agecheck') > -1) {
var appid = window.location.pathname.replace('/agecheck', '').replace('/app/', '');
var month = ['January','February','March','April','May','June','July','August','September','October','November','December'];
$J('#agecheck_form select[name="ageDay"] option[value="'+rand(1,29)+'"]').attr('selected','selected');
$J('#agecheck_form select[name="ageYear"] option[value="'+rand(1985,1995)+'"]').attr('selected','selected');
$J('#agecheck_form select[name="ageMonth"] option[value="'+month[rand(0,11)]+'"]').attr('selected','selected');
$J('#agecheck_form').submit();
HideAgeGate(appid);
} else {
$J('#next_in_queue_form').submit();
}
}catch(err) {
console.log('Error clicking next. Error: '+err);
}
})();
})();

function rand(min, max) {
return Math.floor(Math.random()*(max-min)+min);
}