Created
December 6, 2022 01:54
-
-
Save teramotodaiki/be958b10a40d77930210144ca14a6599 to your computer and use it in GitHub Desktop.
ChatGPTがIME未確定の時にエンターキーを押すと送信してしまう挙動をやめるやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const textarea = document.querySelector('textarea[data-id="root"]'); | |
textarea?.addEventListener( | |
"keydown", | |
(event) => { | |
if (event.key === "Enter" && event.isComposing) { | |
event.stopPropagation(); | |
} | |
}, | |
{ capture: true } | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
...略... | |
"manifest_version": 3, | |
"permissions": ["activeTab"], | |
"content_scripts": [ | |
{ | |
"matches": ["https://chat.openai.com/chat"], | |
"js": ["./chatgpt.js"] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment