From 34744a2e18cadf0fe27af4e98f5e1e5cccbf6d9f Mon Sep 17 00:00:00 2001 From: double beep <38133098+double-beep@users.noreply.github.com> Date: Sat, 6 Jul 2024 11:15:39 +0000 Subject: [PATCH] fix: mods can vote to delete no matter what --- src/UserscriptTools/Post.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/UserscriptTools/Post.ts b/src/UserscriptTools/Post.ts index a64273a..6303a05 100644 --- a/src/UserscriptTools/Post.ts +++ b/src/UserscriptTools/Post.ts @@ -409,9 +409,10 @@ export default class Post { const userRep = StackExchange.options.user.rep; - // >20k rep users can vote to delete answers with score < 0 - return ( + 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;