Created
December 16, 2022 15:29
-
-
Save LoLei/08e38967dc50d82f69eb50a96bdea2a0 to your computer and use it in GitHub Desktop.
Make the YT video player theather mode after 5 seconds, if it is not already
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 YouTube Auto Theater Mode | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description Make the YT video player theather mode after 5 seconds, if it is not already | |
| // @author Lorenz Leitner | |
| // @match https://www.youtube.com/watch?v=** | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
| // @grant none | |
| // ==/UserScript== | |
| // Since for some reason after the latest YouTube UI change the theater mode setting is not saved for me... | |
| (function() { | |
| 'use strict'; | |
| setTimeout(() => { | |
| const tBtnCollection = document.getElementsByClassName("ytp-size-button"); | |
| const tBtn = tBtnCollection[0]; | |
| if(tBtn.title.includes("Theater")) { | |
| tBtn.click(); | |
| } | |
| }, 5000); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment