blob: 028b9a3ded6f07169a4b13d72c9feec06e4fd8e1 [file] [log] [blame]
Adrià Vilanova Martínez66836fd2024-05-04 22:43:06 +02001import CssSelectorNodeWatcherScriptHandler from '../../../../common/architecture/scripts/nodeWatcher/handlers/CssSelectorNodeWatcherScriptHandler';
Adrià Vilanova Martínez43c75202024-10-19 15:55:15 +02002import { NodeMutation } from '../../../../presentation/nodeWatcher/NodeWatcherHandler';
Adrià Vilanova Martínez66836fd2024-05-04 22:43:06 +02003import { CCExtraInfoMainOptions } from '../../scripts/ccExtraInfoMain.script';
4
5/**
6 * Inject extra info to threads in the thread list.
7 */
8export default class CCExtraInfoThreadQuestionHandler extends CssSelectorNodeWatcherScriptHandler<CCExtraInfoMainOptions> {
9 cssSelector = 'sc-tailwind-thread-question-question-card sc-tailwind-thread-question-state-chips';
10
11 onMutatedNode({ node }: NodeMutation) {
12 this.options.extraInfo.injectAtQuestionIfEnabled(node);
13 }
14}