From b9fad2f740ce96b234d028bbb693fd4231e77927 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sun, 28 Jun 2020 22:46:03 +0200 Subject: [PATCH] Support WKD for profile page --- assets/scripts.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/assets/scripts.js b/assets/scripts.js index b4463f3..b1baf55 100644 --- a/assets/scripts.js +++ b/assets/scripts.js @@ -582,10 +582,18 @@ if (elFormProofs) { } if (elProfileUid) { - let profileUid = elProfileUid.innerHTML; - let opts = { - input: profileUid, - mode: "hkp" + 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); }