forked from Mirrors/keyoxide-web
Support WKD for profile page
This commit is contained in:
parent
caa43ce8af
commit
b9fad2f740
1 changed files with 12 additions and 4 deletions
|
@ -582,10 +582,18 @@ if (elFormProofs) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elProfileUid) {
|
if (elProfileUid) {
|
||||||
let profileUid = elProfileUid.innerHTML;
|
let profileUid = elProfileUid.innerHTML, opts, match;
|
||||||
let opts = {
|
if (/.*@.*/.test(profileUid)) {
|
||||||
|
match = profileUid.match(/(.*)@(.*)_([a-zA-Z0-9]+)$/);
|
||||||
|
opts = {
|
||||||
|
input: `${match[1]}@${match[2]}.${match[3]}`,
|
||||||
|
mode: "wkd"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
opts = {
|
||||||
input: profileUid,
|
input: profileUid,
|
||||||
mode: "hkp"
|
mode: "hkp"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
displayProfile(opts);
|
displayProfile(opts);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue