mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-28 03:50:10 +00:00
Compare commits
1 Commits
2205b3d80c
...
0ce4896302
Author | SHA1 | Date | |
---|---|---|---|
|
0ce4896302 |
20
ts/user.ts
20
ts/user.ts
@ -266,20 +266,12 @@ class ReferralCard {
|
|||||||
get code(): string { return this._code; }
|
get code(): string { return this._code; }
|
||||||
set code(c: string) {
|
set code(c: string) {
|
||||||
this._code = c;
|
this._code = c;
|
||||||
|
let url = window.location.href;
|
||||||
let u = new URL(window.location.href);
|
let pathArray = url.split('/');
|
||||||
let path = u.pathname;
|
url = `${pathArray[0]}//${pathArray[2]}/`;
|
||||||
for (let split of ["account", "my"]) {
|
if (url.slice(-1) != "/") { url += "/"; }
|
||||||
path = path.split(split)[0];
|
url = url + "invite/" + this._code;
|
||||||
}
|
this._url = url;
|
||||||
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; }
|
get remaining_uses(): number { return this._remainingUses; }
|
||||||
|
Loading…
Reference in New Issue
Block a user