您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Disable and gray out buttons in MarketplacePanel_orderBook containers using pure CSS
当前为
// ==UserScript== // @name [MWI]Marketplace Order Book Button Disabler // @name:zh-CN [银河奶牛]市场订单簿按钮禁用器 // @namespace https://cnb.cool/shenhuanjie/skyner-cn/tamper-monkey-script/mwi-orderbook-button-disabler // @version 2.0.0 // @description Disable and gray out buttons in MarketplacePanel_orderBook containers using pure CSS // @description:zh-CN 使用纯CSS禁用并灰化市场订单簿面板中的按钮 // @author shenhuanjie // @license MIT // @match https://www.milkywayidle.com/game* // @icon https://www.milkywayidle.com/favicon.svg // @grant none // @homepage https://cnb.cool/shenhuanjie/skyner-cn/tamper-monkey-script/mwi-orderbook-button-disabler // @supportURL https://cnb.cool/shenhuanjie/skyner-cn/tamper-monkey-script/mwi-orderbook-button-disabler // @run-at document-start // ==/UserScript== (function() { 'use strict'; // 添加纯CSS实现 const style = document.createElement('style'); style.textContent = ` /* 选择市场订单簿面板中的所有按钮 */ div[class*="MarketplacePanel_orderBook"] button { opacity: 0.5 !important; cursor: not-allowed !important; pointer-events: none !important; background-color: #e0e0e0 !important; color: #888 !important; border-color: #ccc !important; filter: grayscale(100%) !important; transition: all 0.3s ease !important; } /* 确保禁用状态不会被其他样式覆盖 */ div[class*="MarketplacePanel_orderBook"] button:hover, div[class*="MarketplacePanel_orderBook"] button:active, div[class*="MarketplacePanel_orderBook"] button:focus { opacity: 0.5 !important; cursor: not-allowed !important; pointer-events: none !important; background-color: #e0e0e0 !important; color: #888 !important; border-color: #ccc !important; filter: grayscale(100%) !important; box-shadow: none !important; transform: none !important; } `; document.head.appendChild(style); console.log('[OrderBookDisabler] 已应用纯CSS禁用规则,市场订单簿按钮已被禁用'); })();