您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Queue messages when ChatGPT is still composing responses
当前为
// ==UserScript== // @name ChatGPT Message Queue // @match https://chat.openai.com/* // @match https://chatgpt.com/* // @description Queue messages when ChatGPT is still composing responses // @version 0.0.1.20250317193005 // @namespace https://gf.zukizuki.org/users/1435046 // ==/UserScript== (function() { 'use strict'; // Set up a mutation observer to detect when the text area is added to the DOM const observer = new MutationObserver(() => { const textarea = document.getElementById('prompt-textarea'); if (textarea && !textarea.dataset.queueEnabled) { textarea.dataset.queueEnabled = 'true'; textarea.addEventListener('keydown', async (e) => { // Check if Enter pressed without modifiers if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey) { // Check if ChatGPT is composing (stop button exists) if (document.querySelector('[data-testid="stop-button"]')) { e.preventDefault(); // Wait for send button to appear const waitForSend = setInterval(() => { const sendButton = document.querySelector('[data-testid="send-button"]'); if (sendButton) { clearInterval(waitForSend); sendButton.click(); } }, 100); } } }); } }); // Start observing observer.observe(document.body, { childList: true, subtree: true }); })();