diff --git a/assets/js/250.ts b/assets/js/250.ts index b925ae201cc..2e5f8754e98 100644 --- a/assets/js/250.ts +++ b/assets/js/250.ts @@ -208,6 +208,10 @@ class S250 { return User.isLoggedIn(); } + static isClub250() { + return location.origin === process.env.CLUB_250_BASE_URL; + } + static syncLogin() { return User.syncLogin(); } @@ -375,5 +379,7 @@ class S250 { document.body.removeChild(textarea); } } -} new S250; +} + window.S250 = S250; +new S250; diff --git a/assets/js/User.ts b/assets/js/User.ts index b3aa2235449..3491ea85948 100644 --- a/assets/js/User.ts +++ b/assets/js/User.ts @@ -71,10 +71,12 @@ export default class User { static syncLoginUi() { if (this.isLoggedIn()) { this.rewireTagLinks(); + this.hideObsoleteTiers(); } + if (S250.isClub250()) return; + const userBar = document.getElementById('user'); - // Anything beyond this point will not run on Club 250. if (!userBar) return; const classes = userBar.classList; @@ -83,7 +85,6 @@ export default class User { if (this.isLoggedIn()) { this.updateUserBar(); - this.hideObsoleteTiers(); } }