From 58c85cdbbdcadcf277c525a17ca941c0054895df Mon Sep 17 00:00:00 2001 From: double beep <38133098+double-beep@users.noreply.github.com> Date: Thu, 5 Dec 2024 18:03:54 +0000 Subject: [PATCH] fix: correct the icon location in Staging Ground --- src/UserscriptTools/Post.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/UserscriptTools/Post.ts b/src/UserscriptTools/Post.ts index 536efd7..30d60d2 100644 --- a/src/UserscriptTools/Post.ts +++ b/src/UserscriptTools/Post.ts @@ -390,9 +390,9 @@ export default class Post { } public addIcons(): void { - const iconLocation = this.element.querySelector( - 'a.question-hyperlink, a.answer-hyperlink, .s-link, .js-post-menu > div.d-flex' - ); + const iconLocation = this.element.querySelector('.js-post-menu > div.d-flex') + ?? this.element.querySelector('a.question-hyperlink, a.answer-hyperlink, .s-link'); + const icons = (Object.values(this.reporters) as Reporter[]) .filter(reporter => reporter.wasReported()) .map(reporter => reporter.getIcon());