您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes "Explore Premium" and "Install App" buttons from Spotify web player.
当前为
// ==UserScript== // @name Button Remover // @namespace http://tampermonkey.net/ // @version 1.2 // @description Removes "Explore Premium" and "Install App" buttons from Spotify web player. // @author InariOkami // @icon https://www.google.com/s2/favicons?sz=64&domain=spotify.com // @match https://open.spotify.com/* // @grant none // ==/UserScript== (function() { 'use strict'; function removeElementsByClassName(className) { let elements = document.getElementsByClassName(className); while(elements.length > 0){ elements[0].parentNode.removeChild(elements[0]); } } removeElementsByClassName('ButtonInner-sc-14ud5tc-0 ksgXuD encore-over-media-set'); removeElementsByClassName('ButtonInner-sc-14ud5tc-0 kNmeGH encore-inverted-light-set Upqw01TOXETOmR5Td7Dj'); const observer = new MutationObserver(function(mutations) { mutations.forEach(function() { removeElementsByClassName('ButtonInner-sc-14ud5tc-0 ksgXuD encore-over-media-set'); removeElementsByClassName('ButtonInner-sc-14ud5tc-0 kNmeGH encore-inverted-light-set Upqw01TOXETOmR5Td7Dj'); }); }); observer.observe(document.body, { childList: true, subtree: true }); })();