diff --git a/website/index.html b/website/index.html index f11a798..e7e3272 100644 --- a/website/index.html +++ b/website/index.html @@ -253,17 +253,22 @@ - ${Object.entries(seenBy).sort((a, b) => b[1] - a[1]).map(([topic, seen]) => { - const captures = topic.match(/^(.*)(?:\/2\/e\/(.*)\/(![0-9a-f]+)|\/2\/map\/)$/) - return ` + ${Array.from( + new Map( + Object.entries(seenBy) + .map(([topic, seen]) => (m => ({seen, via: m[3] ?? id, root: m[1], chan: m[2]}))(topic.match(/^(.*)(?:\/2\/e\/(.*)\/(![0-9a-f]+)|\/2\/map\/)$/))) + .sort((a, b) => a.seen - b.seen) + .map(v => [v.via, v]) + ).values(), + ({seen, via, root, chan}) => ` - - - + + + ` - }).join('')} + ).reverse().join('')}
Last seenviaroot topicchannel
${since(seen)}${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] ?? 'n/a (MapReport)')}${via !== id ? (num => data[num] ? nodeLink(num, via) : via)(parseInt(via.slice(1), 16)) : 'self'}${html(root)}${html(chan ?? 'n/a (MapReport)')}
` const populateDetailsLayer = () => {