您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Forces the highest quality playback for videos and images on all sites. Enhances thumbnails and video previews instantly without lag, pausing, or freezing.
// ==UserScript== // @name Ultimate Video & Image Quality Enhancer (No Lag, Best Previews) // @namespace https://gf.qytechs.cn/shannonturner // @version 1.4 // @description Forces the highest quality playback for videos and images on all sites. Enhances thumbnails and video previews instantly without lag, pausing, or freezing. // @author tae // @match *://*/* // @grant none // @run-at document-start // ==/UserScript== (function () { 'use strict'; console.log("✅ Ultimate Video & Image Quality Enhancer is now active!"); function enhanceMedia() { try { document.querySelectorAll('img:not([data-enhanced])').forEach(img => { if (!img.closest('iframe') && !img.closest('[class*="ad"], [id*="ad"]')) { enhanceImage(img); } }); document.querySelectorAll('video:not([data-enhanced])').forEach(video => { enhanceVideo(video); }); } catch (err) { console.warn("❌ Error while enhancing media:", err); } } function enhanceImage(img) { if (!img.src || img.hasAttribute('data-enhanced')) return; try { // Upgrade to high-resolution if typical low-res parameters are detected img.src = img.src .replace(/=s\d+/g, '=s2160') .replace(/w=\d+/g, 'w=2160') .replace(/h=\d+/g, 'h=3840'); img.style.imageRendering = 'crisp-edges'; img.style.filter = 'none'; img.setAttribute('data-enhanced', 'true'); } catch (e) { console.error('❌ Failed to enhance image:', e); } } function enhanceVideo(video) { if (video.hasAttribute('data-enhanced')) return; try { video.setAttribute('data-enhanced', 'true'); video.preload = 'auto'; video.playsInline = true; video.autobuffer = true; video.style.filter = 'none'; // Attempt to force highest quality playback if (typeof video.getAvailableQualityLevels === 'function') { const levels = video.getAvailableQualityLevels(); if (levels?.length) { video.setPlaybackQuality?.(levels[0]); } } video.load(); } catch (e) { console.error('❌ Failed to enhance video:', e); } } function observeDOM() { const observer = new MutationObserver(() => { requestAnimationFrame(enhanceMedia); }); observer.observe(document.documentElement || document.body, { childList: true, subtree: true }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { enhanceMedia(); observeDOM(); }); } else { enhanceMedia(); observeDOM(); } setInterval(enhanceMedia, 7000); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址