Adrià Vilanova MartÃnez | 2ba5d8d | 2024-05-04 21:17:16 +0200 | [diff] [blame] | 1 | import Script, { ConcreteScript } from '../common/architecture/scripts/Script'; |
| 2 | import ScriptFilterListProvider from '../common/architecture/scripts/ScriptFilterListProvider'; |
| 3 | import MWI18nServerScript from './mainWorldServers/MWI18nServerScript.script'; |
| 4 | import MWOptionsWatcherServerScript from './mainWorldServers/MWOptionsWatcherServerScript.script'; |
| 5 | import XHRInterceptorScript from './xhrInterceptor/xhrInterceptor.script'; |
| 6 | |
| 7 | export default class StandaloneScripts extends ScriptFilterListProvider { |
| 8 | private scripts: ConcreteScript[] = [ |
| 9 | MWI18nServerScript, |
| 10 | MWOptionsWatcherServerScript, |
| 11 | XHRInterceptorScript, |
| 12 | ]; |
| 13 | private initializedScripts: Script[]; |
| 14 | |
| 15 | protected getUnfilteredScriptsList() { |
| 16 | if (this.initializedScripts === undefined) { |
| 17 | this.initializedScripts = this.scripts.map((script) => new script()); |
| 18 | } |
| 19 | return this.initializedScripts; |
| 20 | } |
| 21 | } |