Merge pull request #13 from iBug/patch-2
Automatically upvote others' lost soul comments
This commit is contained in:
commit
43eb9b7f25
1 changed files with 11 additions and 0 deletions
|
@ -93,6 +93,17 @@
|
|||
});
|
||||
}
|
||||
|
||||
// Upvote all comments containing "welcome to"
|
||||
comments.find("li").each(function() {
|
||||
if ($(this).find("span.comment-copy")[0].innerText.toLowerCase().indexOf("welcome to") >= 0) {
|
||||
// Click the "up" triangle
|
||||
let upButtons = $(this).find("a.comment-up");
|
||||
if (upButtons.length > 0) {
|
||||
upButtons[0].click();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// You can't flag without 15 rep
|
||||
if (myReputation < 15)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue