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 extra info in questions. */ |
| 6 | export default class CCExtraInfoThreadQuestionHandler extends CssSelectorNodeWatcherHandler { |
| 7 | cssSelector = |
| 8 | 'sc-tailwind-thread-question-question-card sc-tailwind-thread-question-state-chips'; |
| 9 | |
| 10 | constructor(private extraInfo: ExtraInfo) { |
| 11 | super(); |
| 12 | } |
| 13 | |
| 14 | onMutatedNode({ node }: NodeMutation) { |
| 15 | this.extraInfo.injectAtQuestionIfEnabled(node); |
| 16 | } |
| 17 | } |