Skip to content

Instantly share code, notes, and snippets.

@malisipi
Last active February 24, 2024 20:48
Show Gist options
  • Select an option

  • Save malisipi/b5605be3f56181d29dd9ee06a961aa4c to your computer and use it in GitHub Desktop.

Select an option

Save malisipi/b5605be3f56181d29dd9ee06a961aa4c to your computer and use it in GitHub Desktop.
no_loudness_for_youtube.user.js
// ==UserScript==
// @name YouTube - No Loudness
// @namespace https://malisipi.github.io/
// @version 2024-02-24
// @description Disable loudness mode of YouTube
// @author malisipi
// @match http://*.youtube.com/*
// @match https://*.youtube.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
setInterval(()=>{
let __yt_video = document.querySelector("video.html5-main-video");
let __yt_volume = document.querySelector(".ytp-volume-panel");
if(!!__yt_video && !!__yt_volume) {
__yt_video.volume = __yt_volume.getAttribute("aria-valuenow")/100
};
}, 500);
})();
@malisipi
Copy link
Author

There should be a better way than creating a interval however it's working :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment