Steam que via keyboard.

lets you navigate you steam queue via keybaord, specifically the arrow keys

目前為 2020-08-30 提交的版本,檢視 最新版本

// ==UserScript==
// @name       Steam que via keyboard.
// @namespace  https://steamcommunity.com/id/Pleyar1/
// @version    0.2
// @description  lets you navigate you steam queue via keybaord, specifically the arrow keys
// @match      https://store.steampowered.com/app/*
// @match      https://store.steampowered.com/explore/
// @copyright  no lmao,2'
// ==/UserScript==
(function(){
document.addEventListener('keydown', function(e) {
    'use strict';
    switch (e.keyCode) {

        case 37:
            //left
            if(document.querySelector("#add_to_wishlist_area").style.display == "none") {
              document.querySelector("#add_to_wishlist_area_success > a > span").click();
            }
            else{
                    document.querySelector("#add_to_wishlist_area > a > span").click();
                }
            break;

        case 38:
            //up

                if (document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div > div.queue_control_button.queue_btn_follow > div.btnv6_blue_hoverfade.btn_medium.queue_btn_active").style.display == "none") {
                     // click to follow
                    document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div > div.queue_control_button.queue_btn_follow > div.btnv6_blue_hoverfade.btn_medium.queue_btn_inactive").click();
                } else {
                 //Click to UNfollow
                document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div > div.queue_control_button.queue_btn_follow > div.btnv6_blue_hoverfade.btn_medium.queue_btn_active").click();
                }

            break;

        case 39:
            //right

            //if the que needs refreshed, refresh it bb
            if (document.querySelector("#refresh_queue_btn > span") != null) {
                if (document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.page_header_ctn > div.page_content_ctn.discovery_queue_content_ctn > div > div.discovery_queue_apps > div.discover_queue_empty").style.display != "none") {
                    document.querySelector("#refresh_queue_btn").click();
                    window.setTimeout(location.reload(), 67899);
                    break;
                }
            }
            //if the que needs resumed, resume it bb
            if (document.querySelector("#discovery_queue_start_link") != null){
                console.log("logb");
                document.querySelector("#discovery_queue_start_link").click();
                break;
            }

            //if you aren't in the que, hop in bb.
            if (document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div > a") != null){
                document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div > a").click();
                break;
            }

            if (document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div.queue_actions_ctn > div.next_in_queue_area > div.btn_next_in_queue.btn_next_in_queue_trigger") != null){

                document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div.queue_actions_ctn > div.next_in_queue_area > div.btn_next_in_queue.btn_next_in_queue_trigger").click();
                break;
            }
            //if all else fails refresh the damn page
            location.reload();
            break;

        case 40:
            //down

            //if not in que
            if (document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div > a") != null) {
                if (document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div > div:nth-child(6) > div.queue_control_button.queue_btn_ignore > div.btnv6_blue_hoverfade.btn_medium.queue_btn_active").style.display == "none") {
                    document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div > div:nth-child(6) > div.queue_control_button.queue_btn_ignore > div.btnv6_blue_hoverfade.btn_medium.queue_btn_inactive").click();
                }
                else {
                    document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div > div:nth-child(6) > div.queue_control_button.queue_btn_ignore > div.btnv6_blue_hoverfade.btn_medium.queue_btn_active").click();
                }
            }
            //if in que
            else {
                if (document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div.queue_actions_ctn > div:nth-child(8) > div.queue_control_button.queue_btn_ignore > div.btnv6_blue_hoverfade.btn_medium.queue_btn_active").style.display == "none"){
                    document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div.queue_actions_ctn > div:nth-child(8) > div.queue_control_button.queue_btn_ignore > div.btnv6_blue_hoverfade.btn_medium.queue_btn_inactive").click();
                }
                else {
                    document.querySelector("body > div.responsive_page_frame.with_header > div.responsive_page_content > div.responsive_page_template_content > div.game_page_background.game > div.page_content_ctn > div.block > div.queue_overflow_ctn > div > div.queue_actions_ctn > div:nth-child(8) > div.queue_control_button.queue_btn_ignore > div.btnv6_blue_hoverfade.btn_medium.queue_btn_active").click();
                }
            }
            break;

        default:
            //quit
            break;

    }
}, false);
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址