注意:在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
?_=1
来访问最新页面。https://zh.moegirl.org.cn/User:BearBin/js/LyricStyleToggle.js?_=1
var _addText = '{{Documentation|content=* 工具介绍见[[User:BearBin/js#LyricStyleToggle]]。\n* 源代码见[https://github.com/BearBin1215/MoegirlPedia/blob/master/src/gadgets/LyricStyleToggle GitHub]。}}'; // <nowiki> $((()=>(async()=>{if(!(document.getElementsByClassName("Lyrics")[0]||document.getElementsByClassName("poem")[0]&&$("#catlinks").text().match(/音[乐樂]作品/)))return;await mw.loader.using(["user.options","ext.gadget.libBottomRightCorner","ext.gadget.site-lib"]);const t=insertToBottomRightCorner("歌词除色").attr("id","lyric-style-toggle").css({"user-select":"none",order:"60"});t.on("click",(()=>{$("body").toggleClass("lyric-style-toggle-on"),document.getElementsByClassName("lyric-style-toggle-on")[0]?($(".Lyrics-original").each((function(){this.allStyles=$(this).attr("style"),$(this).attr("style","color:#000")})),$(".Lyrics-translated").each((function(){this.allStyles=$(this).attr("style"),$(this).attr("style","color:#656565")})),$(".Lyrics, .Lyrics span:not(.mw-collapsible), .poem, .poem span").each((function(){this.allStyles=$(this).attr("style"),$(this).attr("style","")})),t.text("恢复样式")):($(".Lyrics, .Lyrics-original, .Lyrics-translated, .Lyrics span:not(.mw-collapsible), .poem, .poem span").each((function(){$(this).attr("style",this.allStyles)})),t.text("歌词除色"))}))})())); // </nowiki>