diff --git a/template.js b/template.js
index e4ad8cb..7c13ce2 100644
--- a/template.js
+++ b/template.js
@@ -107,15 +107,22 @@
user = element.querySelector('b').innerText;
element.classList.add('proven');
const proofs = await getUser(user) || []
+ let shownWebsite = [];
for (const {proof_type, nametag, service_url} of proofs) {
if (proof_type === 'twitter' || (proof_type !== 'keybase' && keybaseBadgeOnly))
continue;
+ if ((proof_type === "dns") || (proof_type === "generic_web_site")) {
+ if (shownWebsite.includes(nametag))
+ continue;
+ }
element.innerHTML += oneLineTrim`
`;
+ if ((proof_type === "dns") || (proof_type === "generic_web_site"))
+ shownWebsite.push(nametag);
}
}
const mobileElement = document.querySelector('._2CFyTHU5:not(.proven)');
@@ -123,9 +130,14 @@
user = mobileElement.querySelector('.Z5IeoGpY').innerText.replace('@', '');
mobileElement.classList.add('proven');
const proofs = await getUser(user) || []
+ let shownWebsite = [];
for (const {proof_type, nametag, service_url} of proofs) {
if (proof_type === 'twitter' || (proof_type !== 'keybase' && keybaseBadgeOnly))
continue;
+ if ((proof_type === "dns") || (proof_type === "generic_web_site")) {
+ if (shownWebsite.includes(nametag))
+ continue;
+ }
mobileElement.innerHTML += oneLineTrim`
@@ -133,6 +145,8 @@
${icons[proof_type]} ${nametag}
`;
+ if ((proof_type === "dns") || (proof_type === "generic_web_site"))
+ shownWebsite.push(nametag);
}
}
}
@@ -161,13 +175,20 @@
target = element.parentElement.previousSibling;
}
const proofs = await getUser(user) || []
+ let shownWebsite = [];
for (const {proof_type, nametag, service_url} of proofs) {
if (proof_type === 'twitter' || (proof_type !== 'keybase' && keybaseBadgeOnly))
continue;
+ if ((proof_type === "dns") || (proof_type === "generic_web_site")) {
+ if (shownWebsite.includes(nametag))
+ continue;
+ }
target.innerHTML += oneLineTrim`
${icons[proof_type]}
`;
+ if ((proof_type === "dns") || (proof_type === "generic_web_site"))
+ shownWebsite.push(nametag);
}
}
@@ -187,10 +208,17 @@
element.classList.add('proven');
const user = element.innerText;
const proofs = await getUser(user, 'hackernews');
+ let shownWebsite = [];
for (const {proof_type, nametag, service_url} of proofs.slice().reverse()) {
if (proof_type === 'hackernews' || (proof_type !== 'keybase' && keybaseBadgeOnly)) continue;
+ if ((proof_type === "dns") || (proof_type === "generic_web_site")) {
+ if (shownWebsite.includes(nametag))
+ continue;
+ }
element.insertAdjacentHTML('afterend', `
${icons[proof_type]}`);
+ if ((proof_type === "dns") || (proof_type === "generic_web_site"))
+ shownWebsite.push(nametag);
}
}
}