您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
9/11/2024, 4:57:30 PM
当前为
// ==UserScript== // @name Spotify lyric background override // @namespace Violentmonkey Scripts // @match https://open.spotify.com/* // @grant none // @version 1.1 // @author M Ogdahl // @description 9/11/2024, 4:57:30 PM // @license MIT // ==/UserScript== const delay = ms => new Promise(res => setTimeout(res, ms)); const styleString = "--lyrics-color-active: rgb(133,153,0); --lyrics-color-inactive: rgb(101,123,131); --lyrics-color-passed: rgba(133,153,0,0.5); --lyrics-color-background: rgb(0,43,54); --lyrics-color-messaging: rgb(0, 0, 0);"; const MyFunction = async () => { 'use strict'; await delay(2000); console.log("Waited 5 seconds"); while (true) { await delay(100); let possibleDiv = document.getElementsByClassName("FUYNhisXTCmbzt9IDxnT"); if (possibleDiv[0] != undefined) { if (possibleDiv[0].style.cssText !=styleString) { possibleDiv[0].style.cssText = styleString; console.log(possibleDiv[0].style.cssText); console.log("Overwrote lyrics style!"); } else { //console.log(possibleDiv[0].style.cssText); } } } }; MyFunction()