Created
June 10, 2026 11:11
-
-
Save a2ikm/22b9a150fda257fe46aaea8311c374d5 to your computer and use it in GitHub Desktop.
a.js
This file contains hidden or 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
| // ==UserScript== | |
| // @name Disable GitHub list auto-continuation | |
| // @namespace local | |
| // @match https://github.com/* | |
| // @run-at document-start | |
| // @grant none | |
| // ==/UserScript== | |
| (function () { | |
| document.addEventListener( | |
| 'keydown', | |
| function (e) { | |
| if (e.key !== 'Enter') return; | |
| if (e.isComposing) return; // IME 変換確定の Enter は触らない | |
| if (e.metaKey || e.ctrlKey || e.altKey) return; // 送信(Cmd+Enter)等は通す | |
| const t = e.target; | |
| if (!(t instanceof HTMLTextAreaElement)) return; | |
| // capture 段階で GitHub の継続ハンドラだけ止める。 | |
| // preventDefault は呼ばないので、ブラウザ既定のプレーンな改行は通る。 | |
| e.stopImmediatePropagation(); | |
| }, | |
| true // capture phase: GitHub のリスナーより先に実行する | |
| ); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment