diff --git a/website/index.html b/website/index.html index 783e899..f11a798 100644 --- a/website/index.html +++ b/website/index.html @@ -255,25 +255,12 @@ ${Object.entries(seenBy).sort((a, b) => b[1] - a[1]).map(([topic, seen]) => { const captures = topic.match(/^(.*)(?:\/2\/e\/(.*)\/(![0-9a-f]+)|\/2\/map\/)$/) - let reporter - if (!captures[3]) { - reporter = 'map report' - } else if (captures[3] === id) { - reporter = 'self' - } else { - reporter = parseInt(captures[3].slice(1), 16) - if (data[reporter]) { - reporter = nodeLink(reporter, captures[3]) - } else { - reporter = captures[3] - } - } return ` ${since(seen)} - ${reporter} + ${captures[3] && captures[3] !== id ? (num => data[num] ? nodeLink(num, captures[3]) : captures[3])(parseInt(captures[3].slice(1), 16)) : 'self'} ${html(captures[1])} - ${html(captures[2] ?? '')} + ${html(captures[2] ?? 'n/a (MapReport)')} ` }).join('')}