您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
持续监听对话并输出屏蔽内容
当前为
// ==UserScript== // @name Deepseek Chat Monitor // @author okiseji // @version 1.0 // @description 持续监听对话并输出屏蔽内容 // @match https://chat.deepseek.com/* // @grant none // @namespace https://greasyfork.org/users/762448 // ==/UserScript== (function() { 'use strict'; let latestChatNum = 2; let previousContent = ''; let longestContent = ''; // 创建一个插件 UI 元素 const pluginUI = document.createElement('div'); pluginUI.id = 'plugin-ui'; pluginUI.style.position = 'fixed'; pluginUI.style.top = '0'; pluginUI.style.right = '20px'; pluginUI.style.width = '300px'; pluginUI.style.height = '100%'; pluginUI.style.overflowY = 'scroll'; pluginUI.style.backgroundColor = '#f9f9f9'; pluginUI.style.color = '#333'; pluginUI.style.border = '1px solid #ccc'; pluginUI.style.borderRadius = '5px'; pluginUI.style.padding = '10px'; pluginUI.style.zIndex = '9999'; document.body.appendChild(pluginUI); function getLatestChatContent() { while (true) { const selector = `#root > div > div.c3ecdb44 > div.f2eea526 > div > div.b83ee326 > div > div > div.dad65929 > div:nth-child(${latestChatNum})`; const element = document.querySelector(selector); if (!element) { break; } latestChatNum += 2; } latestChatNum -= 2; const latestChatSelector = `#root > div > div.c3ecdb44 > div.f2eea526 > div > div.b83ee326 > div > div > div.dad65929 > div:nth-child(${latestChatNum})`; const latestChatElement = document.querySelector(latestChatSelector); if (latestChatElement) { const chatContentElement = latestChatElement.querySelector('div.ds-markdown.ds-markdown--block'); const thinkingContentElement = latestChatElement.querySelector('div.edb250b1 > div.e1675d8b'); let currentContent = ''; if (thinkingContentElement) { const paragraphs = thinkingContentElement.querySelectorAll('p'); paragraphs.forEach(p => { currentContent += p.innerText + '\n'; }); } if (chatContentElement) { currentContent += chatContentElement.innerHTML; } if (currentContent.length > longestContent.length) { longestContent = currentContent; } if (currentContent.length < previousContent.length) { pluginUI.innerHTML = ''; pluginUI.innerHTML = longestContent; longestContent = ''; } previousContent = currentContent; } else { console.log('Cannot find the latest chat'); } } setInterval(getLatestChatContent, 1000); })();