Steam开发商/发行商旧版搜索

商店页点击开发商或发行商链接将使用旧版本搜索。

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        SteamDeveloperAndPublisherSearch
// @name:zh-CN  Steam开发商/发行商旧版搜索
// @description Use legacy search when the developer/publisher link is clicked.
// @description:zh-cn 商店页点击开发商或发行商链接将使用旧版本搜索。
// @namespace   https://greasyfork.org/users/255836-icue
// @version     0.70
// @match       https://store.steampowered.com/app/*
// ==/UserScript==

var elements = document.getElementsByClassName("summary column");
for (var i = 0; i < elements.length; i++) {
    if (elements.item(i).id === "developers_list") {
        elements.item(i).querySelectorAll("a").forEach(function (node) {
            if (node.text && node.text !== "") {
                node.href = "https://store.steampowered.com/search/?developer=" + node.text;
            }
        });
        // elements.item(i + 1) should be the publisher list
        if (i + 1 >= elements.length) {
            break;
        }
        elements.item(i + 1).querySelectorAll("a").forEach(function (node) {
            if (node.text && node.text !== "") {
                node.href = "https://store.steampowered.com/search/?publisher=" + node.text;
            }
        });
        break;
    }
}