您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove demo panels only if they contain the "Free Demo" indicator
// ==UserScript== // @name Remove Demos From Steam While Browsing // @namespace http://tampermonkey.net/ // @version 1.0 // @description Remove demo panels only if they contain the "Free Demo" indicator // @match https://store.steampowered.com/* // @grant none // ==/UserScript== (function() { 'use strict'; function removeFreeDemoPanels() { // Find all candidate demo panel containers. const panels = document.querySelectorAll('div._1_P15GG6AKyF_NMX2j4-Mu.Panel.Focusable'); panels.forEach(panel => { // Look for a child element with the Free Demo indicator. const freeDemoIndicator = panel.querySelector('div._3j4dI1yA7cRfCvK8h406OB'); if (freeDemoIndicator && freeDemoIndicator.textContent.trim() === "Free Demo") { panel.remove(); console.log("Removed Free Demo panel:", panel); } }); } // Run on initial page load. window.addEventListener('load', removeFreeDemoPanels); // Observe DOM mutations in case panels are added dynamically. const observer = new MutationObserver(mutations => { for (const mutation of mutations) { if (mutation.addedNodes.length > 0) { removeFreeDemoPanels(); } } }); observer.observe(document.body, { childList: true, subtree: true }); })();