1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-29 12:30:11 +00:00
This commit is contained in:
jeppevinkel 2024-07-10 01:23:45 +02:00 committed by GitHub
commit aa493a40cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -267,9 +267,8 @@ class ReferralCard {
set code(c: string) { set code(c: string) {
this._code = c; this._code = c;
let url = window.location.href; let url = window.location.href;
for (let split of ["#", "?", "account", "my"]) { let pathArray = url.split('/');
url = url.split(split)[0]; url = `${pathArray[0]}//${pathArray[2]}/`;
}
if (url.slice(-1) != "/") { url += "/"; } if (url.slice(-1) != "/") { url += "/"; }
url = url + "invite/" + this._code; url = url + "invite/" + this._code;
this._url = url; this._url = url;