Crunchyroll - Remove Player Shadow

Removes the hover shadow overlay on Crunchyroll player

// ==UserScript==
// @name         Crunchyroll - Remove Player Shadow
// @namespace    Cr-RPS
// @version      1.2
// @description  Removes the hover shadow overlay on Crunchyroll player
// @author       Lone Strider
// @match        *://*.crunchyroll.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=crunchyroll.com
// @run-at       document-body
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const style = document.createElement('style');
    style.textContent = `
        #velocity-controls-package > div:nth-child(1) {
            background: transparent !important;
            background-image: none !important;
            box-shadow: none !important;
            opacity: 0 !important;
        }
    `;
    document.head.appendChild(style);

    // Keep the style in place for SPA reloads
    const observer = new MutationObserver(() => {
        if (!document.head.contains(style)) document.head.appendChild(style);
    });
    observer.observe(document.head, { childList: true }); // observe only <head> instead of whole document
})();