blob: 98f40f4c701873e985c5fd1e354d98927f322e55 [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 abuse info chip in profiles. */
6export default class CCExtraInfoProfileAbuseChipsHandler extends CssSelectorNodeWatcherHandler {
7 cssSelector = 'ec-unified-user .scTailwindUser_profileUsercardmain';
8
9 constructor(private extraInfo: ExtraInfo) {
10 super();
11 }
12
13 onMutatedNode({ node }: NodeMutation) {
14 this.extraInfo.injectAbuseChipsAtProfileIfEnabled(node);
15 }
16}