1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-28 03:50:10 +00:00

Compare commits

..

1 Commits

Author SHA1 Message Date
jeppevinkel
0ce4896302
Merge 6052329c0b into a7529c7498 2024-07-10 09:07:34 +02:00

View File

@ -266,20 +266,12 @@ class ReferralCard {
get code(): string { return this._code; }
set code(c: string) {
this._code = c;
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();
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;
}
get remaining_uses(): number { return this._remainingUses; }