Last active
February 24, 2024 20:48
-
-
Save malisipi/b5605be3f56181d29dd9ee06a961aa4c to your computer and use it in GitHub Desktop.
no_loudness_for_youtube.user.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==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); | |
| })(); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There should be a better way than creating a interval however it's working :D