Skip to content

Commit

Permalink
trim preview length
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeDrangon committed Aug 14, 2024
1 parent a4b1931 commit df1e5aa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/helpers/observers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit df1e5aa

Please sign in to comment.