Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Auto Steam Discovery Queue
- // @namespace http://steamcommunity.com/id/zetx/
- // @description Go to next game queued as soon as page is done loading.
- // @include http://store.steampowered.com/app/*
- // @include http://store.steampowered.com/explore/*
- // @include http://store.steampowered.com/agecheck/app/*
- // @run-at document-end
- // @grant none
- // ==/UserScript==
- // I basically pulled this from http://stackoverflow.com/a/13734859
- function GM_main() {
- window.onload = function () {
- if ($J('#next_in_queue_form')) {
- $J('.queue_sub_text').text("Loading next in queue");
- $J('#next_in_queue_form').submit();
- }
- if ($J('#refresh_queue_btn')) {
- $("span:contains('Start another queue >>')");
- $J.post( 'http://store.steampowered.com/explore/generatenewdiscoveryqueue', {
- sessionid: g_sessionID,
- queuetype: this.m_eQueueType,
- }).done( function ( data ) {
- window.location = 'http://store.steampowered.com/explore/next';
- }).fail( function() {
- ShowAlertDialog( 'Start another queue >>', 'There was a problem saving your preferences. Please try again later.' );
- } );
- }
- if($J('#btnv6_blue_hoverfade btn_small')) {
- $("span:contains('Enter')");
- jQuery('#ageYear').val (1915).trigger ('change');
- DoAgeGateSubmit();
- }
- }
- }
- addJS_Node(null, null, GM_main);
- //-- This is a standard-ish utility function:
- function addJS_Node(text, s_URL, funcToRun, runOnLoad) {
- var D = document;
- var scriptNode = D.createElement ('script');
- if (runOnLoad) {
- scriptNode.addEventListener ("load", runOnLoad, false);
- }
- scriptNode.type = "text/javascript";
- if (text) scriptNode.textContent = text;
- if (s_URL) scriptNode.src = s_URL;
- if (funcToRun) scriptNode.textContent = '(' + funcToRun.toString() + ')()';
- var targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement;
- targ.appendChild (scriptNode);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement