Skip to content

Commit b456c63

Browse files
committed
GitHub: Tweak comments for commits too.
1 parent 8dc61dc commit b456c63

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

GitHubA11yFixes.user.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ function onNodeAdded(target) {
2828
// res[1] will be "issues", "pull", "commit", etc.
2929
// res[2] will be "/" if we're dealing with a single issue, pull, commit, etc.
3030
// but it won't be if this is an issue listing, commit listing, etc.
31-
if (["issues", "pull"].indexOf(res[1]) >= 0 && res[2] == "/") {
32-
// Issue or pull request.
31+
if (["issues", "pull", "commit"].indexOf(res[1]) >= 0 && res[2] == "/") {
32+
// Issue, pull request or commit.
3333
// Comment headers.
3434
for (elem of target.querySelectorAll(".timeline-comment-header-text, .discussion-item-header"))
3535
makeHeading(elem, 3);
36-
} else if (res[1] == "commits") {
36+
}
37+
if (res[1] == "commits") {
3738
// Commit listing.
3839
// Commit group headers.
3940
for (elem of target.querySelectorAll(".commit-group-title"))

0 commit comments

Comments
 (0)