Skip to content

Instantly share code, notes, and snippets.

@abaines
Last active September 29, 2020 23:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abaines/1693c6005e5d7e0b38810ff867baefff to your computer and use it in GitHub Desktop.
Save abaines/1693c6005e5d7e0b38810ff867baefff to your computer and use it in GitHub Desktop.
Reduce YouTube Music volume below 5%
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