Ever play on your computer and notice that challenges and battles (or just turning on AQ in a large map) can be... quite noisy? But don't want to mute the tab entirely? I have the niche script for you!
// ==UserScript==
// @name Lower Warzone Volume
// @version 1.0
// @description Lower the volume output of Warzone website
// @match https://www.warzone.com/Idle/Play
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Override the Audio constructor to set a lower volume
var originalAudio = window.Audio;
window.Audio = function(src) {
var audio = new originalAudio(src);
audio.volume = 0.04; // Adjust this value to set the desired volume level (between 0 and 1)
return audio;
};
// Intercept and modify the play function of HTMLAudioElement prototype
var originalPlayFunction = HTMLAudioElement.prototype.play;
HTMLAudioElement.prototype.play = function() {
this.volume = 0.04; // Adjust this value to set the desired volume level (between 0 and 1)
return originalPlayFunction.apply(this, arguments);
};
})();
For those unfamiliar with userscripts, check out this Muli thread:
https://www.warzone.com/Forum/106092-mulis-userscript-tidy-up-dashboardTo make this script start working just click your script extension, create new script, and paste the code from above and save. Should work. Works for me.
PS. By default i have this setting to 4% volume in the 0.04 numbers found. Change those higher or lower as you desire.
PSS. This script was written by AI, I only sort of understand how it works. It doesn't function on the very first instance of sound usually either.
PSSS. If you really wanted yo ucould change the url in @match to be all of warzone.com and it would lower volumes of sounds across the site.