您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Tidal makes the subscription advertising loud and annoying, so make it bit quailet.
// ==UserScript== // @name The Tidal advertising be silent // @namespace http://tampermonkey.net/ // @version 0.1 // @license GPLv3 // @description Tidal makes the subscription advertising loud and annoying, so make it bit quailet. // @author Gedweb // @match https://listen.tidal.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=tidal.com // @grant GM_setValue // @grant GM_getValue // ==/UserScript== (function () { 'use strict'; let localMuted = false; function checkReady() { let playerNode = document.getElementsByTagName('video')[0]; if (undefined === playerNode) { return; } let lastVolume = playerNode.volume; let node, containsAD = false; let titleRoot = document.querySelectorAll('[data-test="footer-track-title"]')[0] || document; let walk = document.createTreeWalker(titleRoot, NodeFilter.SHOW_TEXT, null); while (node = walk.nextNode()) { if ("Advertisement" === node.textContent) { containsAD = true; } } if (containsAD && !localMuted) { playerNode.volume = 0.3; localMuted = true; } else if (localMuted) { playerNode.volume = lastVolume; localMuted = false; } } setInterval(function () { checkReady(); }, 1000); })();