<< Back to Warzone Idle Forum   Search

Posts 1 - 2 of 2   
Userscript for lowering Idle Volume: 2025-02-21 21:30:26

Swiftscout 
Level 60
Report
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-dashboard

To 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.
Userscript for lowering Idle Volume: 2025-02-21 21:51:57

Dan
Level 40
Report
I think you should use a single variable to reference the audio volume, possibly using localStorage so that if you decide to update the usercript (you should publish on https://greasyfork.org), the audio volume doesn't get reset if/whenever the script updates.

Edited 2/21/2025 21:52:13
Posts 1 - 2 of 2