您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Blurs the font of the sidebar when the mouse is not hovering over it. So people won't read your history.
当前为
// ==UserScript== // @name ChatGPT Privacy Blur // @namespace http://tampermonkey.net/ // @version 0.2 // @description Blurs the font of the sidebar when the mouse is not hovering over it. So people won't read your history. // @author You // @match *://*.openai.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Add CSS to the head of the document const style = document.createElement('style'); style.innerHTML = ` .blur-effect { filter: blur(3px); transition: filter 700ms ease-in-out 300ms; } .blur-effect:hover { filter: none; transition: filter 700ms ease-in-out; } `; document.head.appendChild(style); // Function to apply the blur effect function applyBlur(sidebar) { if (sidebar) { sidebar.classList.add('blur-effect'); } } // Function to remove the blur effect function removeBlur(sidebar) { if (sidebar) { sidebar.classList.remove('blur-effect'); } } // Function to add event listeners to toggle the blur effect function addListeners(sidebar) { if (sidebar) { // Apply the blur effect by default applyBlur(sidebar); // Add event listeners to toggle the blur effect sidebar.addEventListener('mouseover', () => removeBlur(sidebar)); sidebar.addEventListener('mouseout', () => applyBlur(sidebar)); } } // Get the sidebar element const sidebarXPath = '/html/body/div[1]/div[2]/div[1]/div/div/nav/div'; const sidebar = document.evaluate(sidebarXPath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; // Apply listeners to the current sidebar addListeners(sidebar); // Observe changes in the DOM to handle dynamic content const observer = new MutationObserver((mutations) => { for (const mutation of mutations) { if (mutation.type === 'childList') { const newSidebar = document.evaluate(sidebarXPath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; addListeners(newSidebar); } } }); observer.observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址