diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-09-21 23:18:15 -0500 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-09-21 23:18:15 -0500 |
| commit | b88ff9fe8e80cc4d8aa0db2a3595ab10f40f4439 (patch) | |
| tree | 234e442aaaff83d1a50fb15998690dc4f0bfe6c6 /youtube/disable-mini-player.user.js | |
| parent | 531a76993e2babcecc69be7b5333729078c8dd9b (diff) | |
| download | userscripts-b88ff9fe8e80cc4d8aa0db2a3595ab10f40f4439.tar.xz userscripts-b88ff9fe8e80cc4d8aa0db2a3595ab10f40f4439.zip | |
move all scripts to scripts dir
Diffstat (limited to 'youtube/disable-mini-player.user.js')
| -rw-r--r-- | youtube/disable-mini-player.user.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/youtube/disable-mini-player.user.js b/youtube/disable-mini-player.user.js deleted file mode 100644 index fea5f1f..0000000 --- a/youtube/disable-mini-player.user.js +++ /dev/null @@ -1,35 +0,0 @@ -// ==UserScript== -// @name Disable YouTube Miniplayer -// @author tjkeller.xyz -// @include *youtube.com* -// @grant GM_addStyle -// @homepageURL https://git.tjkeller.xyz/userscripts/about -// @downloadURL https://git.tjkeller.xyz/userscripts/plain/youtube/disable-mini-player.user.js -// @version 1.1 -// @author tjkeller.xyz -// ==/UserScript== - -// Remove home and shorts button -GM_addStyle(` - ytd-miniplayer, - .ytp-miniplayer-button - { - display: none !important; /* Needs !important flag */ - } -`) - - -// Pause video before navigating -document.body.addEventListener("yt-navigate-start", () => { - if (window.location.pathname == "/watch") - document.querySelector("ytd-player video").pause() -}) - -// Close miniplayer by clicking close button in code -document.body.addEventListener("yt-navigate-finish", () => { - setTimeout(() => { - const miniplayerCloseButton = document.querySelector("button.ytp-miniplayer-close-button") - if (miniplayerCloseButton) - miniplayerCloseButton.click() - }, 500) // Wait 500ms to close consistantly since miniplayer loads a little after this event -}) |
