blob: 1a016fc3d9ce258b66d6564ae214ef968c6699f0 [file] [log] [blame]
import CssSelectorNodeWatcherHandler from '../../../../infrastructure/presentation/nodeWatcher/handlers/CssSelectorHandler.adapter';
import { NodeMutation } from '../../../../presentation/nodeWatcher/NodeWatcherHandler';
import ThreadPageDesignWarning from '../../core/threadPageDesignWarning';
/** Inject old thread page design warning if applicable */
export default class ThreadPageDesignWarningInjectHandler extends CssSelectorNodeWatcherHandler {
cssSelector = 'ec-thread > .page > .material-content > div[role="list"]';
constructor(private threadPageDesignWarning: ThreadPageDesignWarning) {
super();
}
onMutatedNode({ node }: NodeMutation) {
this.threadPageDesignWarning.injectWarningIfApplicable(node);
}
}