您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add custom menu music to Battledudes.io with a toggle button
// ==UserScript== // @name Battledudes.io Menu Music Toggle // @namespace http://tampermonkey.net/ // @version 0.2 // @description Add custom menu music to Battledudes.io with a toggle button // @author trịnh HƯng // @match https://battledudes.io/* // @grant none // ==/UserScript== (function() { 'use strict'; // Replace 'YOUR_AUDIO_FILE_URL' with the actual URL of your audio file var audioFileUrl = 'https://surviv-halloween.pro/audio/ambient/menu_music_01.mp3'; // Create an audio element var audioElement = document.createElement('audio'); audioElement.src = audioFileUrl; audioElement.loop = true; // Append the audio element to the body document.body.appendChild(audioElement); // Play the audio when the script runs audioElement.play(); // Function to toggle the audio on and off function toggleAudio() { if (audioElement.paused) { // If paused, play the audio audioElement.play(); } else { // If playing, pause the audio audioElement.pause(); } } // Create a toggle button var toggleButton = document.createElement('button'); toggleButton.innerHTML = 'Toggle Music'; toggleButton.style.position = 'fixed'; toggleButton.style.top = '10px'; toggleButton.style.right = '10px'; toggleButton.style.zIndex = '9999'; toggleButton.addEventListener('click', toggleAudio); // Append the button to the body document.body.appendChild(toggleButton); })();