Skip to content

Commit 6877146

Browse files
committed
Issue-comments: Update avatar logo class name. Fixes #20
1 parent e225aa7 commit 6877146

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

github-issue-comments.user.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name GitHub Toggle Issue Comments
3-
// @version 1.0.26
3+
// @version 1.0.27
44
// @description A userscript that toggles issues/pull request comments & messages
55
// @license MIT
66
// @author Rob Garrison
@@ -212,7 +212,7 @@
212212
str = "<h3>Hide Comments from</h3>",
213213
unique = [],
214214
// get all avatars
215-
avatars = $$(".timeline-comment-avatar"),
215+
avatars = $$(".timeline-comment-avatar img"),
216216
len = avatars.length - 1, // last avatar is the new comment with the current user
217217

218218
loop = (callback) => {
@@ -224,7 +224,7 @@
224224
}
225225
el = avatars[indx];
226226
name = (el.getAttribute("alt") || "").replace("@", "");
227-
if (unique.indexOf(name) < 0) {
227+
if (!unique.includes(name)) {
228228
str += `<span class="ghic-avatar tooltipped tooltipped-n" aria-label="${name}">
229229
${iconHidden}
230230
<img class="ghic-avatar avatar" width="24" height="24" src="${el.src}"/>
@@ -455,7 +455,7 @@
455455
}
456456

457457
function hideParticipant(el) {
458-
let els, indx, len, name,
458+
let els, indx, len, name, hide,
459459
results = [];
460460
if (el) {
461461
el.classList.toggle("comments-hidden");

0 commit comments

Comments
 (0)