-
-
Notifications
You must be signed in to change notification settings - Fork 165
/
Copy pathmain.ts
33 lines (29 loc) · 1.35 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { enableProdMode, importProvidersFrom } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { environment } from './environments/environment';
import { AppComponent } from './app/app.component';
import { AppRoutingModule } from './app/app-routing.module';
import { BrowserModule, bootstrapApplication } from '@angular/platform-browser';
import { provideAnimations } from '@angular/platform-browser/animations';
if (environment.production) {
enableProdMode();
//show this warning only on prod mode
if (window) {
selfXSSWarning();
}
}
bootstrapApplication(AppComponent, {
providers: [importProvidersFrom(BrowserModule, AppRoutingModule), provideAnimations()],
}).catch((err) => console.error(err));
function selfXSSWarning() {
setTimeout(() => {
console.log(
'%c** STOP **',
'font-weight:bold; font: 2.5em Arial; color: white; background-color: #e11d48; padding-left: 15px; padding-right: 15px; border-radius: 25px; padding-top: 5px; padding-bottom: 5px;',
);
console.log(
`\n%cThis is a browser feature intended for developers. Using this console may allow attackers to impersonate you and steal your information sing an attack called Self-XSS. Do not enter or paste code that you do not understand.`,
'font-weight:bold; font: 2em Arial; color: #e11d48;',
);
});
}