您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
从URL中提取q查询参数,填入对话框,提交搜索
当前为
// ==UserScript== // @name 给deepseek网站添加q查询参数:chat.deepseek.com/?q={query} // @namespace http://tampermonkey.net/ // @version 2025-2-7 // @description 从URL中提取q查询参数,填入对话框,提交搜索 // @author smilingpoplar // @match https://chat.deepseek.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=deepseek.com // @license MIT // ==/UserScript== (() => { 'use strict'; const query = new URLSearchParams(window.location.search).get('q'); if (!query) return; const input = document.querySelector('#chat-input'); if (!input) return console.error('找不到输入框'); const getReactProps = el => el[Object.keys(el).find(k => k.startsWith('__reactProps$'))]; getReactProps(input)?.onChange?.({ target: { value: query }, currentTarget: { value: query }, preventDefault: () => { }, stopPropagation: () => { } }); input.value = query; setTimeout(() => { getReactProps(input)?.onKeyDown?.({ key: 'Enter', keyCode: 13, shiftKey: false, target: input, currentTarget: input, preventDefault: () => { }, stopPropagation: () => { }, }); }, 500); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址