Last active
April 21, 2019 20:10
-
-
Save SilverEzhik/8e6f2aad383d8baf27bbf196f57259de to your computer and use it in GitHub Desktop.
YouTube is annoying in persistently switching autoplay back on, probably due to my cookie shennanigans, this fixes that.
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 Disable YouTube Autoplay | |
// @version 1 | |
// @grant none | |
// @include https://*youtube.com/* | |
// @run-at document-idle | |
// ==/UserScript== | |
function fix() { | |
var a = document.getElementById("toggle"); | |
if (a.getAttribute("aria-pressed") == "true") { | |
a.click(); | |
} | |
} | |
setInterval(fix, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment