blob: 57278eea9dedddc458a5b050143cb3561aed9615 [file] [log] [blame]
import {getDisplayLanguage} from '../../utils/common.js';
import PerForumStatsSection from '../../utils/PerForumStatsSection.js';
import BaseExtraInfoInjection from './base.js';
export default class ProfilePerForumStatsExtraInfoInjection extends
BaseExtraInfoInjection {
constructor(infoHandler, optionsWatcher) {
super(infoHandler, optionsWatcher);
this.displayLanguage = getDisplayLanguage();
}
async isEnabled() {
return await this.optionsWatcher.isEnabled('perforumstats');
}
inject(profileInfo, injectionDetails) {
new PerForumStatsSection(
injectionDetails.chart?.parentNode, profileInfo.body,
this.displayLanguage, /* isCommunityConsole = */ true);
}
}