Adrià Vilanova MartÃnez | cb12c59 | 2024-11-09 20:46:03 +0100 | [diff] [blame^] | 1 | import CssSelectorNodeWatcherHandler from '../../../../../infrastructure/presentation/nodeWatcher/handlers/CssSelectorHandler.adapter'; |
| 2 | import { NodeMutation } from '../../../../../presentation/nodeWatcher/NodeWatcherHandler'; |
| 3 | import ExtraInfo from '../../../core'; |
| 4 | |
| 5 | /** Inject abuse info chip in profiles. */ |
| 6 | export 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 | } |