diff --git a/index.html b/index.html index 4d20a04..c644715 100644 --- a/index.html +++ b/index.html @@ -361,6 +361,7 @@ let withTor = true, q = ""; let minAmount = 50000; const fmt = n => (n != null ? Number(n).toLocaleString('en-US') : '—'); +const trunc = (s, m=40) => s && s.length > m ? s.slice(0, m) + '…' : s; function getChain() { const btn = document.querySelector('#chainSeg [aria-pressed="true"]'); @@ -391,7 +392,7 @@ function render() { tb.insertAdjacentHTML('beforeend', ` ${rank} - ${DOMPurify.sanitize(d.url)} + ${DOMPurify.sanitize(trunc(d.url))} ${DOMPurify.sanitize(d.info||'—')} ${fmt(d.base_fee)} ${DOMPurify.sanitize(d.version||'—')} @@ -404,7 +405,7 @@ function render() { ml.insertAdjacentHTML('beforeend', `
-
#${rank}
${DOMPurify.sanitize(d.url)}
+
#${rank}
${DOMPurify.sanitize(trunc(d.url))}
Score${fmt(d.points)}