您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Prevents Reddit from saving search history by repeatedly clearing the 'recent-searches-store' key from Local Storage.
// ==UserScript== // @name Reddit - Block Search History (Local Storage Method) // @namespace http://tampermonkey.net/ // @version 2.0 // @description Prevents Reddit from saving search history by repeatedly clearing the 'recent-searches-store' key from Local Storage. // @author Andrino Cauduro - https://github.com/AndrinoC // @match https://www.reddit.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // The name of the key Reddit uses in Local Storage to save search history. const STORAGE_KEY = 'recent-searches-store'; // A function to remove the search history key. function deleteSearchHistory() { // Only attempt to remove if the key actually exists. if (localStorage.getItem(STORAGE_KEY)) { localStorage.removeItem(STORAGE_KEY); console.log('Reddit search history key found and deleted.'); } } deleteSearchHistory(); setInterval(deleteSearchHistory, 500); // Checks and deletes every 500ms. })();