Skip to content

Instantly share code, notes, and snippets.

View izawa's full-sized avatar
🏕️
BRB

いざわゆきみつ (Yukimitsu Izawa) izawa

🏕️
BRB
View GitHub Profile
@teramotodaiki
teramotodaiki / chatgpt.js
Created December 6, 2022 01:54
ChatGPTがIME未確定の時にエンターキーを押すと送信してしまう挙動をやめるやつ
const textarea = document.querySelector('textarea[data-id="root"]');
textarea?.addEventListener(
"keydown",
(event) => {
if (event.key === "Enter" && event.isComposing) {
event.stopPropagation();
}
},
{ capture: true }
);