refactor: add ScriptRunner class
Change-Id: I118adb9ec338e88b40321208b84228886bb6b590
diff --git a/src/platforms/communityConsole/entryPoints/start.ts b/src/platforms/communityConsole/entryPoints/start.ts
index b7cb6eb..2410f2c 100644
--- a/src/platforms/communityConsole/entryPoints/start.ts
+++ b/src/platforms/communityConsole/entryPoints/start.ts
@@ -4,13 +4,18 @@
ScriptRunPhase,
} from '../../../common/architecture/scripts/Script';
import Features from '../../../features/Features';
+import ScriptRunner from '../../../common/architecture/scripts/ScriptRunner';
// Run legacy Javascript entry point
import '../../../contentScripts/communityConsole/start';
const features = new Features();
-features.runScripts({
+const scripts = features.getScripts({
page: ScriptPage.CommunityConsole,
environment: ScriptEnvironment.ContentScript,
runPhase: ScriptRunPhase.Start,
});
+
+const scriptRunner = new ScriptRunner();
+scriptRunner.add(...scripts);
+scriptRunner.run();