您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Make craftwar's obs plugin (https://craftwarblog.blogspot.com/2018/01/obs-plugin-playing-song.html) able to get NightBot-AutoDJ song name.
当前为
- // ==UserScript==
- // @author craftwar
- // @name MooBot-song-player song-name helpera
- // @description Make craftwar's obs plugin (https://craftwarblog.blogspot.com/2018/01/obs-plugin-playing-song.html) able to get NightBot-AutoDJ song name.
- // @copyright 2020, craftwar (https://craftwarblog.blogspot.com/)
- // @license GPL-3.0-or-later; https://www.gnu.org/licenses/gpl-3.0.txt
- // @homepageURL https://github.com/craftwar/userscript/tree/master/MooBot-song-name-helper
- // @version 0.1.20200301
- // @namespace github.com.craftwar
- // @match https://moo.bot/*
- // @grant none
- // @run-at document-end
- // ==/UserScript==
- (() => {
- const body_observer = new MutationObserver((record, observer) => {
- const song_list = document.querySelector(".widget-song-requests-list");
- if (song_list) {
- observer.disconnect();
- const song_observer = new MutationObserver(() => {
- document.title = song_list.querySelector(".widget-song-requests-list-text > h4:first-child").firstChild.wholeText + " - YouTube";
- });
- song_observer.observe(song_list, { subtree: true, childList: true });
- }
- });
- const body_element = document.querySelector("body");
- body_observer.observe(body_element, { subtree: true, childList: true });
- })();