Skip to content

Commit 2e9b235

Browse files
fix: correct message display position in focal posts containing links (#1603)
1 parent 46e39f3 commit 2e9b235

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ts/core/core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ class Core {
7575
const sbsMessageWrapper = new SbsMessageWrapper(messageData);
7676

7777
const landmarkElement = tweet.metadata.isFocalMode
78-
? tweet.element.querySelector<HTMLElement>("div[dir]:has(a[href^='/'])")?.parentElement?.parentElement
79-
?.parentElement
78+
? tweet.element.querySelector<HTMLElement>("div[dir]:has(a[href^='/']):has(time)")?.parentElement
79+
?.parentElement?.parentElement
8080
: tweet.element.querySelector<HTMLElement>("div[role='group'][id]");
8181

8282
if (!landmarkElement) throw new Error("Failed to get landmark element of tweet");

0 commit comments

Comments
 (0)