GitHub by default allows in the issues area for a public repo:
This script creates a confirmation popup whenever attempting to submit an issue or post a comment via Ctrl+Enter in GitHub
i.e. it applies in these 3 cases:
Thanks to trespassersW for his help here.