您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
remember to enable autoplay!
// ==UserScript== // @name Messana.org restore background music // @namespace http://tampermonkey.net/ // @version 1.1 // @description remember to enable autoplay! // @author blazor67 // @match messana.org // @match www.messana.org/* // @grant none // ==/UserScript== (function() { 'use strict'; try{ let m = document.querySelector("bgsound"); let a = document.createElement("audio"); let s = document.createElement("source"); //console.log(m); a.autoplay = true; a.loop = true; //a.controls = true; s.src = m.getAttribute("src"); s.type="audio/mpeg"; document.body.appendChild(a); a.appendChild(s); //a.play(); console.log("Now playing: ", m.getAttribute("src")); } catch(exception){ console.log("Errore: nessun audio da riprodurre."); } })();