您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Zeigt Cover beim Hover sauber vergrößert, ohne Rahmen, verschwindet sofort auch beim Scrollen
当前为
// ==UserScript== // @name scenenzbs Thumb-Hoverblock + Overlay Clean // @namespace https://scenenzbs.com/ // @version 5.0 // @description Zeigt Cover beim Hover sauber vergrößert, ohne Rahmen, verschwindet sofort auch beim Scrollen // @author Baumeister // @match https://scenenzbs.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // === HIER EINSTELLEN === const ZOOMFACTOR = 2.5; // 1.0 = 340x480, 2.0 = 680x960 usw. const BASE_WIDTH = 340; const BASE_HEIGHT = 480; // Platzhalter erkennen (nicht anzeigen) function isPlaceholder(img) { const src = (img.getAttribute('src') || '').toLowerCase(); return src.includes('category_') || src.includes('placeholder.webp'); } // Hover-Effekte der Seite deaktivieren function killThumbZoomHover() { document.querySelectorAll('img.thumb-zoom').forEach(img => { img.style.transform = 'none'; img.style.transition = 'none'; img.style.zIndex = 'auto'; img.style.position = 'static'; }); if(!window.__hoverblockCSS) { let s = document.createElement('style'); s.innerHTML = ` img.thumb-zoom:hover, .thumb-zoom-wrap:hover img.thumb-zoom, img.thumb-zoom:active, img.thumb-zoom:focus { transform: none !important; transition: none !important; z-index: auto !important; position: static !important; outline: none !important; filter: none !important; box-shadow: none !important; } `; document.head.appendChild(s); window.__hoverblockCSS = true; } } // Overlay-Bild einmalig erzeugen if(!window.__overlayImg) { let overlayImg = document.createElement('img'); overlayImg.className = 'ultra-overlay-img'; Object.assign(overlayImg.style, { position: 'fixed', left: '50%', top: '50%', transform: 'translate(-50%,-50%)', zIndex: 99999, opacity: 0, pointerEvents: 'none', display: 'block', maxWidth: (BASE_WIDTH * ZOOMFACTOR) + 'px', maxHeight: (BASE_HEIGHT * ZOOMFACTOR) + 'px', objectFit: 'contain', transition: 'opacity 0.18s cubic-bezier(.19,1,.22,1)' }); document.body.appendChild(overlayImg); window.__overlayImg = overlayImg; } function bindOverlay() { document.querySelectorAll('img.thumb-zoom').forEach(img => { if(img.dataset.ultraBound) return; img.dataset.ultraBound = '1'; img.addEventListener('mouseenter', () => { if (isPlaceholder(img)) { window.__overlayImg.style.opacity = 0; return; } window.__overlayImg.src = img.src; window.__overlayImg.style.opacity = 1; }); img.addEventListener('mouseleave', () => { window.__overlayImg.style.opacity = 0; }); }); } // Overlay auch beim Scrollen verstecken window.addEventListener('scroll', () => { window.__overlayImg.style.opacity = 0; }); // Initialisierung killThumbZoomHover(); bindOverlay(); // Auch für dynamisch nachgeladene Inhalte const observer = new MutationObserver(() => { killThumbZoomHover(); bindOverlay(); }); observer.observe(document.body, {childList:true,subtree:true}); })();