3D Enhanced Thumbnail and Video Enhancer with HDR Enhancement

Enhance thumbnails and videos with high definition, HDR filter, and 3D effects

// ==UserScript==
// @name         3D Enhanced Thumbnail and Video Enhancer with HDR Enhancement
// @namespace    http://tampermonkey.net/
// @version      1.8.2
// @description  Enhance thumbnails and videos with high definition, HDR filter, and 3D effects
// @author       Tae
// @license      MIT
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // CSS styles for enhancements
    const enhancementStyles = `
        .hdr-enhanced {
            filter: contrast(1.0) brightness(1.0) saturate(0.9);
            transform: perspective(1000px) rotateY(15deg);
            transition: transform 0.3s ease, filter 0.3s ease;
            transform-origin: center center;
        }
        .hdr-hover:hover {
           filter: contrast(1.0) brightness(1.0) saturate(0.9);
            transform: perspective(1000px) rotateY(15deg);
        }
    `;
    const styleSheet = document.createElement('style');
    styleSheet.textContent = enhancementStyles;
    document.head.appendChild(styleSheet);

    // Enhance media elements
    function enhanceElement(el) {
        if (!el.classList.contains('hdr-enhanced')) {
            el.classList.add('hdr-enhanced', 'hdr-hover');
        }
    }

    // Apply enhancements to all images, videos, and thumbnails
    function applyEnhancements() {
        document.querySelectorAll('img, video').forEach(el => {
            if (!el.closest('iframe') && !el.closest('[class*="ad"], [id*="ad"]')) {
                enhanceElement(el);
            }
        });
    }

    // Observer for dynamically loaded content
    const observer = new MutationObserver(applyEnhancements);
    observer.observe(document.body, { childList: true, subtree: true });

    // Apply enhancements on initial page load
    applyEnhancements();
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址