您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
屏蔽谷歌搜索下拉框的搜索历史
// ==UserScript== // @name 屏蔽Google搜索历史 // @namespace http://tampermonkey.net/ // @version 0.2 // @description 屏蔽谷歌搜索下拉框的搜索历史 // @author 向日葵 // @match *://*.google.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=google.com // @grant none // ==/UserScript== (function() { 'use strict'; const originOpen = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function (_, url) { if (url.startsWith('/complete/search?')) { const xhr = this; const getter = Object.getOwnPropertyDescriptor( XMLHttpRequest.prototype, "response" ).get; Object.defineProperty(xhr, "responseText", { get: () => { let response = getter.call(xhr); try { let data = JSON.parse(response.split('\n')[1]); data[0] = data[0].filter(i=>!(i.length === 4 && i[3].du !== undefined)) let cheatText = response.split('\n')[0] + '\n' + JSON.stringify(data) return cheatText } catch (e) { console.log(e) return response; } }, }); } originOpen.apply(this, arguments); }; })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址