Skip to content

Commit

Permalink
style: fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
double-beep authored Jul 6, 2024
1 parent 34744a2 commit 8e878d6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/UserscriptTools/Post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,15 @@ export default class Post {

const userRep = StackExchange.options.user.rep;

return StackExchange.options.user.isModerator || (
// if the delete button is visible, then the user can vote to delete
Boolean(deleteButton)
// >20k rep users can vote to delete answers with score < 0
|| (userRep >= 20_000 && (popover ? this.score <= 0 : this.score < 0))
) // can delete if post isn't already deleted
&& !this.deleted;
return !this.deleted && (
// mods can delete no matter what
StackExchange.options.user.isModerator || (
// if the delete button is visible, then the user can vote to delete
Boolean(deleteButton)
// >20k rep users can vote to delete answers with score < 0
|| (userRep >= 20_000 && (popover ? this.score <= 0 : this.score < 0))
)
);
}

public qualifiesForVlq(): boolean {
Expand Down

0 comments on commit 8e878d6

Please sign in to comment.