refactor(ui-spacing): migrate to the new DI architecture
With this migration we also get for free that this option is now
dynamic, so changing it will automatically update the applied styles.
Bug: twpowertools:176, twpowertools:61
Change-Id: Icac4f829745a06c95439931955be6c52c7303482
diff --git a/src/contentScripts/communityConsole/start.js b/src/contentScripts/communityConsole/start.js
deleted file mode 100644
index 8cb89e8..0000000
--- a/src/contentScripts/communityConsole/start.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import {injectStylesheet} from '../../common/contentScriptsUtils';
-import {getOptions} from '../../common/options/optionsUtils.js';
-
-getOptions(null).then(options => {
- if (options.uispacing) {
- injectStylesheet(chrome.runtime.getURL('css/ui_spacing/shared.css'));
- injectStylesheet(chrome.runtime.getURL('css/ui_spacing/console.css'));
- }
-});
diff --git a/src/contentScripts/publicThreadStart.js b/src/contentScripts/publicThreadStart.js
index 40cd302..9c7f06c 100644
--- a/src/contentScripts/publicThreadStart.js
+++ b/src/contentScripts/publicThreadStart.js
@@ -1,12 +1,6 @@
-import {injectStylesheet} from '../common/contentScriptsUtils';
import {getOptions} from '../common/options/optionsUtils.js';
import {setUpRedirectIfEnabled} from '../redirect/setup.js';
-getOptions(['uispacing', 'redirect']).then(options => {
- if (options.uispacing) {
- injectStylesheet(chrome.runtime.getURL('css/ui_spacing/shared.css'));
- injectStylesheet(chrome.runtime.getURL('css/ui_spacing/twbasic.css'));
- }
-
+getOptions(['redirect']).then(options => {
setUpRedirectIfEnabled(options);
});