您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在Steam商店页面添加一个“查看详细信息”按钮,点击后直接跳转到SteamDB页面
当前为
// ==UserScript== // @name Steam游戏详细信息 // @namespace http://tampermonkey.net/ // @version 1.0 // @description 在Steam商店页面添加一个“查看详细信息”按钮,点击后直接跳转到SteamDB页面 // @author myncdw // @match https://store.steampowered.com/app/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // 创建“查看详细信息”按钮的函数 function createJumpButton() { const button = document.createElement('a'); button.className = 'btn_green_steamui btn_medium'; button.style.marginLeft = '5px'; // 减少边距使按钮靠得更近 button.target = '_blank'; // 设置为在新标签页中打开 const currentUrl = window.location.href; const appIdMatch = currentUrl.match(/\/app\/(\d+)/); if (appIdMatch) { const appId = appIdMatch[1]; const steamDbUrl = `https://steamdb.info/app/${appId}`; button.href = steamDbUrl; // 将按钮的href设置为SteamDB的URL } const span = document.createElement('span'); span.textContent = '查看详细信息'; button.appendChild(span); // 将按钮添加到具有“btn_addtocart”类的div中 const addToCartDiv = document.querySelector('.btn_addtocart'); if (addToCartDiv) { addToCartDiv.appendChild(button); } } // 页面加载时创建按钮 createJumpButton(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址