Skip to content

Instantly share code, notes, and snippets.

@addavriance
Last active June 7, 2026 13:38
Show Gist options
  • Select an option

  • Save addavriance/161979551cbd6dd8d869c608164dbdb9 to your computer and use it in GitHub Desktop.

Select an option

Save addavriance/161979551cbd6dd8d869c608164dbdb9 to your computer and use it in GitHub Desktop.
Removes the Spotify PiP paywall banner to enable unrestricted tiny window resizing.
// ==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