Remove Spotify Now Playing View

Remove the Now Playing view element and div with a specific class from the page

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Remove Spotify Now Playing View
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  Remove the Now Playing view element and div with a specific class from the page
// @author       Drewby123
// @match        *://open.spotify*/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    console.log('Tampermonkey script loaded');

    function removeNowPlayingView() {
        // Remove the Now Playing view by ID
        const nowPlayingView = document.getElementById('Desktop_PanelContainer_Id');
        if (nowPlayingView) {
            nowPlayingView.remove();
            console.log('Now Playing view removed');
        }

        // Remove the div with class OTfMDdomT5S7B5dbYTT8
        const specificDiv = document.querySelector('.OTfMDdomT5S7B5dbYTT8');
        if (specificDiv) {
            specificDiv.remove();
            console.log('Div with class OTfMDdomT5S7B5dbYTT8 removed');
        }
    }

    // Run the function when the page is fully loaded
    window.addEventListener('load', removeNowPlayingView);

    // Observe the document for dynamically added elements
    const observer = new MutationObserver(() => removeNowPlayingView());
    observer.observe(document.body, { childList: true, subtree: true });
})();