Created
September 15, 2020 16:37
-
-
Save lassekongo83/8eac398eeda293f2ad12ac57b49be1a9 to your computer and use it in GitHub Desktop.
Auto-click the dismiss button on YouTube's annoying login modal and then automatically start the video.
This file contains 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 Dismiss YouTube login modal | |
// @namespace https://www.youtube.com/ | |
// @match https://www.youtube.com/* | |
// @grant none | |
// @version 0.1 | |
// @description Auto-click the dismiss button on YouTube's annoying login modal | |
// ==/UserScript== | |
(function() { | |
"use strict"; | |
function clickButton(selector){ | |
let elm = document.querySelectorAll(selector)[0]; | |
if (elm){ elm.click(); } | |
} | |
function tick(){ | |
clickButton('#dismiss-button'); | |
clickButton('.ytp-large-play-button'); | |
} | |
setInterval(tick, 10); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/lassekongo83/8eac398eeda293f2ad12ac57b49be1a9/raw/dismiss-youtube-login-modal.user.js