您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A simple script that prevents the TPM notification sound
// ==UserScript== // @name TPM Notification Sound Disabler // @version 1.0 // @description A simple script that prevents the TPM notification sound // @author ASAP // @match https://tpm.gg/Match/* // @grant none // @namespace https://greasyfork.org/users/1257201 // ==/UserScript== (function() { const { prototype } = HTMLMediaElement; const { set: setter, get: getter } = Object.getOwnPropertyDescriptor(prototype, 'volume'); Object.defineProperty(prototype, 'volume', { get() { return getter.call(this); }, set(arg) { const newArg = this.src.endsWith('/audio/Default.mp3') ? arg / 10 : arg; setter.call(this, newArg); } }); })();