您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replaces Google Image search result links with direct image links
// ==UserScript== // @name PAPAZ Google Direct Image Links // @description Replaces Google Image search result links with direct image links // @version 1.4 // @author DoctorEye // @namespace DoctorEye // @license MIT // @match *://www.google.*/search* // @match *://encrypted.google.*/search* // @grant none // @run-at document-end // ==/UserScript== (function() { 'use strict'; const query = "a[href*='/imgres?']"; function updateLinks() { document.querySelectorAll(query).forEach(link => { const url = new URL(link.href); const imgUrl = url.searchParams.get('imgurl'); if (imgUrl) { console.log('Found image URL:', imgUrl); // Debug log link.href = imgUrl; link.removeAttribute('jsaction'); // Remove Google's event listeners link.addEventListener('click', function(event) { event.stopImmediatePropagation(); event.preventDefault(); window.location.href = imgUrl; }, true); console.log('Updated link:', link.href); // Debug log } }); } const observer = new MutationObserver(updateLinks); observer.observe(document.body, { childList: true, subtree: true }); // Run on initial load document.addEventListener('DOMContentLoaded', updateLinks); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址