MCPcopy Create free account
hub / github.com/ChinaGodMan/UserScripts / handleKeyPress

Function handleKeyPress

chatgpt-plus/chatgpt-plus.user.js:147–156  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

145 })
146 }
147 function handleKeyPress(event) {
148 const textarea = document.getElementById('prompt-textarea')
149 if (textarea && event.target === textarea && event.key === 'Enter' && !event.shiftKey) {
150 event.preventDefault()
151 const sendbutton = document.querySelector('button[data-testid="send-button"]')
152 if (sendbutton) {
153 sendbutton.click()
154 }
155 }
156 }
157 if (isEnter) {
158 document.addEventListener('keydown', handleKeyPress)
159 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected