Skip to content

Commit

Permalink
re-highlight on content load
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jan 20, 2025
1 parent b2404d1 commit 35cbd7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/mod/src/mod.inquiry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { expandMentions } from 'common/richText';
import { storage } from 'common/storage';
import { alert } from 'common/dialog';
import { highlightSearchTerm } from 'common/highlight';
import { pubsub } from 'common/pubsub';

site.load.then(() => {
const noteStore = storage.make('inquiry-note');
Expand Down Expand Up @@ -116,5 +117,7 @@ site.load.then(() => {
addToNote(`Alt: @${username}`);
});

setTimeout(() => highlightSearchTerm(username, '#main-wrap .user-link'), 500);
const highlightUsername = () => highlightSearchTerm(username, '#main-wrap .user-link');
setTimeout(highlightUsername, 300);
pubsub.on('content-loaded', highlightUsername);
});

0 comments on commit 35cbd7d

Please sign in to comment.