Last active
June 7, 2026 13:38
-
-
Save addavriance/161979551cbd6dd8d869c608164dbdb9 to your computer and use it in GitHub Desktop.
Removes the Spotify PiP paywall banner to enable unrestricted tiny window resizing.
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 Spotify PiP Tiny Size Unlock | |
| // @namespace https://gist.github.com/addavriance/161979551cbd6dd8d869c608164dbdb9 | |
| // @version 1.2.0 | |
| // @description Removes the Spotify PiP paywall banner to enable unrestricted tiny window resizing. | |
| // @author addavriance | |
| // @match https://open.spotify.com/* | |
| // @run-at document-start | |
| // @grant none | |
| // @updateURL https://gist.githubusercontent.com/addavriance/161979551cbd6dd8d869c608164dbdb9/raw/spotify-pip-tiny-unlock.user.js | |
| // @downloadURL https://gist.githubusercontent.com/addavriance/161979551cbd6dd8d869c608164dbdb9/raw/spotify-pip-tiny-unlock.user.js | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| if (!('documentPictureInPicture' in window)) return; | |
| window.documentPictureInPicture.addEventListener('enter', (e) => { | |
| const pipDoc = e.window.document; | |
| const style = pipDoc.createElement('style'); | |
| style.textContent = ` | |
| body > div:nth-child(2) > div:nth-child(2) > div:nth-child(1) { | |
| display: none !important; | |
| } | |
| `; | |
| pipDoc.head | |
| ? pipDoc.head.appendChild(style) | |
| : pipDoc.documentElement.appendChild(style); | |
| }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment