blob: f3e8c3cbed9b879fe0f75c81c8b7206d723ffb28 [file] [log] [blame]
Adrià Vilanova Martínezcb12c592024-11-09 20:46:03 +01001import CssSelectorNodeWatcherHandler from '../../../../../infrastructure/presentation/nodeWatcher/handlers/CssSelectorHandler.adapter';
2import { NodeMutation } from '../../../../../presentation/nodeWatcher/NodeWatcherHandler';
3import ExtraInfo from '../../../core';
4
5/** Inject extra info in comments. */
6export default class CCExtraInfoThreadCommentHandler extends CssSelectorNodeWatcherHandler {
7 cssSelector =
8 'sc-tailwind-thread-message-message-list sc-tailwind-thread-message-comment-card';
9
10 constructor(private extraInfo: ExtraInfo) {
11 super();
12 }
13
14 onMutatedNode({ node }: NodeMutation) {
15 this.extraInfo.injectAtCommentIfEnabled(node);
16 }
17}