您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Toggles voice dictation in ChatGPT using Alt+S (works even after browser restarts)
// ==UserScript== // @name GPT Dictation Toggle (Alt+S) - Stable Edition // @namespace http://tampermonkey.net/ // @version 4.1 // @description Toggles voice dictation in ChatGPT using Alt+S (works even after browser restarts) // @author Kamil // @match https://chatgpt.com/* // @grant none // ==/UserScript== (function () { 'use strict'; /** * Toggles between voice dictation start and stop buttons. * - If dictation is not active, starts it. * - If dictation is active, stops it. */ function toggleVoiceDictation() { const startBtn = document.querySelector('button.composer-btn[aria-label="Dictate button"]'); const stopBtn = document.querySelector('button.composer-btn[aria-label="Submit dictation"]'); if (stopBtn) { stopBtn.click(); console.log("🛑 Voice dictation stopped."); } else if (startBtn) { startBtn.click(); console.log("🎤 Voice dictation started."); } else { console.warn("❌ No dictation button found (neither start nor stop)."); } } /** * Listens for Alt+S to trigger the voice toggle. */ document.addEventListener('keydown', function (e) { if (e.altKey && e.key.toLowerCase() === 's') { e.preventDefault(); toggleVoiceDictation(); } }); console.log("✅ OpenAI Voice Toggle (Alt+S) script loaded."); })();