Support WKD for profile page

This commit is contained in:
Yarmo Mackenbach 2020-06-28 22:46:03 +02:00
parent caa43ce8af
commit b9fad2f740

View file

@ -582,10 +582,18 @@ if (elFormProofs) {
}
if (elProfileUid) {
let profileUid = elProfileUid.innerHTML;
let opts = {
let profileUid = elProfileUid.innerHTML, opts, match;
if (/.*@.*/.test(profileUid)) {
match = profileUid.match(/(.*)@(.*)_([a-zA-Z0-9]+)$/);
opts = {
input: `${match[1]}@${match[2]}.${match[3]}`,
mode: "wkd"
}
} else {
opts = {
input: profileUid,
mode: "hkp"
}
}
displayProfile(opts);
}