您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Readd image size information to Yandex Image search result entries if they're not already added.
// ==UserScript== // @name Yandex Image Search Readd Image Size Information // @namespace https://gf.qytechs.cn/en/users/85671-jcunews // @version 1.0.1 // @license AGPL v3 // @author jcunews // @description Readd image size information to Yandex Image search result entries if they're not already added. // @match https://yandex.com/images/search* // @grant none // @run-at document-start // ==/UserScript== /* Due to changes in Yandex site, this script requires that the one-sided Content Security Policy (CSP) is disabled for Yandex site. TamperMonkey users can simply ensure that the `Modify existing content security policy (CSP) headers` security setting is set to `Auto` or anything other than `No`. ViolentMonkey users must use a separate browser extension such as "Header Editor", "Man in the Middle", etc. to disable CSP on Yandex. For privacy reason, it's highly recommended to block access to `csp.yandex.net` via adblocker if it's not yet blocked. Even if CSP is not disabled. */ (() => { var its = {}, jp = JSON.parse; window.its = its; JSON.parse = function() { var r = jp.apply(this, arguments), a, z; if (a = r?.initialState?.serpList?.items?.entities || r?.blocks?.[1]?.params?.adapterData?.serpList?.items?.entities) Object.assign(its, a); return r }; function updItem2(node, a) { if (node.querySelector('.SerpItem-ThumbPlate')) return; a = its[node.id]; node.querySelector('.SerpItem-ThumbPlates').insertAdjacentHTML("beforeend", `<div class="SerpItem-ThumbPlate">${a.origWidth}×${a.origHeight}</div>`) } function updItem(node) { if (!node.done) { node.done = true; (function check() { if (its[node.id]) { updItem2(node) } else setTimeout(check, 200) })() } } (new MutationObserver(recs => { recs.forEach(rec => { rec.addedNodes.forEach((node, a, b) => { if (node.matches) { if (node.matches(".SerpItem")) { updItem(node) } else node.querySelectorAll(".SerpItem").forEach(updItem) } }) }) })).observe(document, {childList: true, subtree: true}) })()
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址