Apple Music Web Optimizer

Remove backdrop-filter & box-shadow, turns blur to solid color

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Apple Music Web Optimizer
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Remove backdrop-filter & box-shadow, turns blur to solid color
// @author       mhendaa
// @match        https://music.apple.com/*
// @icon         https://music.apple.com/favicon.ico
// @grant        none
// @run-at       document-idle
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    var s = document.createElement('style');
    s.textContent = '*,*::before,*::after{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}';
    document.head.appendChild(s);
    var bg = 'rgba(18,18,18,0.85)';
    function p(e) {
        if (getComputedStyle(e).backdropFilter !== 'none')
            e.style.cssText += ';backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background-color:' + bg + '!important';
    }
    document.querySelectorAll('*').forEach(p);
    new MutationObserver(m => m.forEach(r => r.addedNodes.forEach(n => {
        if (n.nodeType === 1) {
            p(n);
            n.querySelectorAll('*').forEach(p);
        }
    }))).observe(document.body, { childList: true, subtree: true });
})();