diff --git a/src/core/NitroCore.ts b/src/core/NitroCore.ts index 6ce46098..e3696b98 100644 --- a/src/core/NitroCore.ts +++ b/src/core/NitroCore.ts @@ -6,7 +6,7 @@ import { ICommunicationManager } from './communication/ICommunicationManager'; import { ConfigurationManager } from './configuration/ConfigurationManager'; import { IConfigurationManager } from './configuration/IConfigurationManager'; import { INitroCore } from './INitroCore'; -import { NitroVersion } from './NitroVersion'; +import { SayHello } from './utils/SayHello'; export class NitroCore extends Disposable implements INitroCore { @@ -18,9 +18,7 @@ export class NitroCore extends Disposable implements INitroCore { super(); - window.console.log.apply(console, [ - `\n%c _ ___ __ \n / | / (_) /__________ \n / |/ / / __/ ___/ __ \\ \n / /| / / /_/ / / /_/ / \n /_/ |_/_/\\__/_/ \\____/ \n \n Thanks for using Nitro \n To report bugs or issues \n join us on Discord \n https://nitrots.co/discord \n \n Renderer: v${ NitroVersion.RENDERER_VERSION } \n UI: v${ NitroVersion.UI_VERSION } \n \n`, - 'color: #FFFFFF; background: #000000; padding:0px 0;' ]); + SayHello(); this._configuration = new ConfigurationManager(); this._communication = new CommunicationManager(); diff --git a/src/core/utils/SayHello.ts b/src/core/utils/SayHello.ts new file mode 100644 index 00000000..6eea78b2 --- /dev/null +++ b/src/core/utils/SayHello.ts @@ -0,0 +1,26 @@ +import { NitroVersion } from '..'; + +export const SayHello = () => +{ + if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1) + { + const args = [ + `\n %c %c %c Nitro ${ NitroVersion.UI_VERSION } - Renderer ${ NitroVersion.RENDERER_VERSION } %c %c %c https://nitrots.co/discord %c %c \n\n`, + 'background: #ffffff; padding:5px 0;', + 'background: #ffffff; padding:5px 0;', + 'color: #ffffff; background: #000000; padding:5px 0;', + 'background: #ffffff; padding:5px 0;', + 'background: #ffffff; padding:5px 0;', + 'background: #000000; padding:5px 0;', + 'background: #ffffff; padding:5px 0;', + 'background: #ffffff; padding:5px 0;' + ]; + + self.console.log(...args); + } + + else if(self.console) + { + self.console.log(`Nitro ${ NitroVersion.UI_VERSION } - Renderer ${ NitroVersion.RENDERER_VERSION } `); + } +};