From df1e5aa2767c2bf79756230bed175308145656f3 Mon Sep 17 00:00:00 2001 From: OrangeDrangon <25403517+OrangeDrangon@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:33:48 -0400 Subject: [PATCH] trim preview length --- src/helpers/observers.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/helpers/observers.ts b/src/helpers/observers.ts index 2201ed66..457e4d4d 100644 --- a/src/helpers/observers.ts +++ b/src/helpers/observers.ts @@ -42,9 +42,12 @@ export function recentThreadObserver() { const image = canvas?.toDataURL(); - const recentMessage = conversation.querySelector( - "a div.text-content div.snippet-text mws-conversation-snippet span" - )?.textContent; + const recentMessage = + conversation + .querySelector( + "a div.text-content div.snippet-text mws-conversation-snippet span" + ) + ?.textContent?.slice(0, 20) + "..."; const focusFunction = () => void conversation.querySelector("a")?.click(); focusFunctions[i] = focusFunction;