Skip to content

Instantly share code, notes, and snippets.

@a2ikm
Created June 10, 2026 11:11
Show Gist options
  • Select an option

  • Save a2ikm/22b9a150fda257fe46aaea8311c374d5 to your computer and use it in GitHub Desktop.

Select an option

Save a2ikm/22b9a150fda257fe46aaea8311c374d5 to your computer and use it in GitHub Desktop.
a.js
// ==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