Last active
October 18, 2020 16:20
-
-
Save Pepijn98/9c2f6eed61ec68f399022237d640406c to your computer and use it in GitHub Desktop.
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 YTLC Auto Switch | |
// @namespace ytlc-auto-switch | |
// @version 1.0.2 | |
// @description Just auto switches to live chat instead of top chat | |
// @author Pepijn98 | |
// @match https://www.youtube.com/* | |
// @grant none | |
// @homepageURL https://github.com/Pepijn98 | |
// @supportURL https://github.com/Pepijn98 | |
// @updateURL https://gist.githubusercontent.com/Pepijn98/9c2f6eed61ec68f399022237d640406c/raw/YTLC-AutoSwitch.meta.js | |
// @downloadURL https://gist.githubusercontent.com/Pepijn98/9c2f6eed61ec68f399022237d640406c/raw/YTLC-AutoSwitch.user.js | |
// @run-at document-idle | |
// ==/UserScript== |
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 YTLC Auto Switch | |
// @namespace ytlc-auto-switch | |
// @version 1.0.2 | |
// @description Just auto switches to live chat instead of top chat | |
// @author Pepijn98 | |
// @match https://www.youtube.com/* | |
// @grant none | |
// @homepageURL https://github.com/Pepijn98 | |
// @supportURL https://github.com/Pepijn98 | |
// @updateURL https://gist.githubusercontent.com/Pepijn98/9c2f6eed61ec68f399022237d640406c/raw/YTLC-AutoSwitch.meta.js | |
// @downloadURL https://gist.githubusercontent.com/Pepijn98/9c2f6eed61ec68f399022237d640406c/raw/YTLC-AutoSwitch.user.js | |
// @run-at document-idle | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var elements = document.getElementsByTagName("yt-live-chat-app"); | |
if (elements.length >= 1) { | |
var btn = document.querySelector("a[class='yt-simple-endpoint style-scope yt-dropdown-menu']"); | |
if (btn) btn.click(); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment