extraInfo: use OptionsWatcher
Bug: twpowertools:93
Change-Id: I092e5798bb7ec4fbd74bf77face3fd6320ee05ab
diff --git a/src/contentScripts/communityConsole/extraInfo.js b/src/contentScripts/communityConsole/extraInfo.js
index 00428b7..88a68be 100644
--- a/src/contentScripts/communityConsole/extraInfo.js
+++ b/src/contentScripts/communityConsole/extraInfo.js
@@ -2,7 +2,7 @@
import {waitFor} from 'poll-until-promise';
import {parseUrl} from '../../common/commonUtils.js';
-import {isOptionEnabled} from '../../common/optionsUtils.js';
+import OptionsWatcher from '../../common/optionsWatcher.js';
import {createPlainTooltip} from '../../common/tooltip.js';
import {createExtBadge} from './utils/common.js';
@@ -186,6 +186,7 @@
id: -1,
timestamp: 0,
};
+ this.optionsWatcher = new OptionsWatcher(['extrainfo']);
this.setUpHandlers();
}
@@ -228,7 +229,7 @@
// Whether the feature is enabled
isEnabled() {
- return isOptionEnabled('extrainfo');
+ return this.optionsWatcher.isEnabled('extrainfo');
}
// Add a pretty component which contains |info| to |node|.