您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This script will replace thumbnail with full size image if available.
// ==UserScript== // @name Display Original Image // @version 0.1.2 // @namespace eight04.blogspot.com // @description This script will replace thumbnail with full size image if available. // @include http* // @grant none // ==/UserScript== "use strict"; function observeDocument(callback) { callback(document.body); new MutationObserver(function(mutations){ var i; for (i = 0; i < mutations.length; i++) { if (!mutations[i].addedNodes.length) { continue; } callback(mutations[i].target); } }).observe(document.body, { childList: true, subtree: true }); } function displayOriginalImage(node) { var imgs = node.querySelectorAll("a[href]>img[src]"); var i; for (i = 0; i < imgs.length; i++) { replace(imgs[i], imgs[i].parentNode); } } function handleError() { this.src = this.oldSrc; this.removeEventListener(handleError); this.classList.add("display-original-image-failed"); } function replace(img, anchor) { if (anchor.classList.contains("display-original-image")) { return; } if (!/\.(jpg|png|gif)($|\?)/i.test(anchor.href)) { return; } img.addEventListener("error", handleError); img.oldSrc = img.src; img.src = anchor.href; anchor.classList.add("display-original-image"); } observeDocument(displayOriginalImage);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址