Last active
September 29, 2020 23:07
-
-
Save abaines/1693c6005e5d7e0b38810ff867baefff to your computer and use it in GitHub Desktop.
Reduce YouTube Music volume below 5%
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
javascript:(function(){ | |
window.__iwm = true; | |
const e = document.querySelector("#movie_player > div.html5-video-container > video"); | |
const v = e.volume; | |
const n = v < 0.015 ? 0.05 : v - 0.01; | |
e.volume = n; | |
if (!window.__kv) { | |
console.clear(); | |
e.addEventListener("volumechange", function(){ | |
document.querySelector("#movie_player > div.html5-video-container > video").volume = window.__kv; | |
console.log(window.__kv.toFixed(2),window.__iwm); | |
window.__iwm = false; | |
document.querySelector("#placeholder").innerText = "Search " + window.__kv.toFixed(2); | |
}); | |
} | |
window.__kv = n; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment