blob: 802dc51a8b831a6554d3e183d3b7035b9f93fb80 [file] [log] [blame]
Adrià Vilanova Martínez66836fd2024-05-04 22:43:06 +02001import CssSelectorNodeWatcherScriptHandler from '../../../../common/architecture/scripts/nodeWatcher/handlers/CssSelectorNodeWatcherScriptHandler';
2import { NodeMutation } from '../../../../common/nodeWatcher/NodeWatcherHandler';
3import { CCExtraInfoMainOptions } from '../../scripts/ccExtraInfoMain.script';
4
5/**
6 * Inject extra info to threads in the thread list.
7 */
8export default class CCExtraInfoThreadCommentHandler extends CssSelectorNodeWatcherScriptHandler<CCExtraInfoMainOptions> {
9 cssSelector = 'sc-tailwind-thread-message-message-list sc-tailwind-thread-message-comment-card';
10
11 onMutatedNode({ node }: NodeMutation) {
12 this.options.extraInfo.injectAtCommentIfEnabled(node);
13 }
14}