Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jfa-go/commit/272c38e0c5b35d8247fcba6191db6bb013831974 You should set ROOT_URL correctly, otherwise the web may not work correctly.

user: url split on pathname only

pull/347/head
Harvey Tindall 9 months ago committed by GitHub
parent 6052329c0b
commit 272c38e0c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -266,12 +266,20 @@ class ReferralCard {
get code(): string { return this._code; }
set code(c: string) {
this._code = c;
let url = window.location.href;
let pathArray = url.split('/');
url = `${pathArray[0]}//${pathArray[2]}/`;
if (url.slice(-1) != "/") { url += "/"; }
url = url + "invite/" + this._code;
this._url = url;
let u = new URL(window.location.href);
let path = u.pathname;
for (let split of ["account", "my"]) {
path = path.split(split)[0];
}
if (path.slice(-1) != "/") { path += "/"; }
path = path + "invite/" + this._code;
u.pathname = path;
u.hash = "";
u.search = "";
this._url = u.toString();
}
get remaining_uses(): number { return this._remainingUses; }

Loading…
Cancel
Save