Skip to content

Commit 0cde041

Browse files
authored
Merge pull request #728 from NazmanRosman/master
issue #2300 party but in the console message
2 parents e6b6982 + cca11da commit 0cde041

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

elements/haxcms-elements/lib/core/haxcms-site-builder.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,9 @@ class HAXCMSSiteBuilder extends I18NMixin(LitElement) {
581581
this.isLoggedIn = toJS(store.isLoggedIn);
582582
UserScaffoldInstance.writeMemory("isLoggedIn", this.isLoggedIn);
583583
const tstamp = Math.floor(Date.now() / 1000);
584+
584585
if (this.isLoggedIn && !this.loggedInTime) {
586+
this.displayConsoleWarning();
585587
this.loggedInTime = tstamp;
586588
this._timeStamp = this.loggedInTime;
587589
var ll = UserScaffoldInstance.readMemory("recentLogins");
@@ -656,11 +658,30 @@ class HAXCMSSiteBuilder extends I18NMixin(LitElement) {
656658
});
657659
}
658660

661+
displayConsoleWarning(){
662+
setTimeout(()=>{
663+
const headStyle = 'color: white; font-weight: bold; font-size: 5em;font-family: arial; background-color: darkred; border: 5px solid white; border: 5px solid white;'
664+
const bodyStyle = "font-size: 1.5em; font-family: arial; color: white; background-color: darkred; "
665+
console.warn("%c⚠️STOP⚠️", headStyle);
666+
console.warn("%cThis is a browser feature intended for developers. If someone told you to copy and paste something here to enable a hidden feature or \"hack\" someone's account, it is a scam and will give them access to your account.", bodyStyle);
667+
},3500)
668+
669+
}
670+
671+
displayConsoleLearnMore(){
672+
setTimeout(()=>{
673+
const headStyle = 'color: white; font-weight: bold; font-size: 5em;font-family: arial; background-color: black; border: 5px solid white; border: 5px solid white; font-style: italic;'
674+
const bodyStyle = 'color: white; background-color: black; font-size: 1.5em; font-family: arial;'
675+
console.log("%c👩‍💻HAXcms🧑‍💻", headStyle);
676+
console.log("%cThis site was created using HAXcms.\nLearn more about HAXcms at https://hax.psu.edu/.", bodyStyle);
677+
},3000)
678+
}
679+
659680
firstUpdated(changedProperties) {
660681
if (super.firstUpdated) {
661682
super.firstUpdated(changedProperties);
662683
}
663-
684+
this.displayConsoleLearnMore();
664685
this.__ready = true;
665686
store.appReady = true;
666687
globalThis.dispatchEvent(

0 commit comments

Comments
 (0)