improve disclosures

This commit is contained in:
2026-07-07 16:11:06 -07:00
parent 8f3b815f16
commit 316a7db1a8

View File

@@ -399,6 +399,8 @@ tr:hover td{{background:#161b22}}
.ml{{color:#58a6ff;cursor:pointer;font-size:0.78rem;text-decoration:none;border-bottom:1px dotted #58a6ff}} .ml{{color:#58a6ff;cursor:pointer;font-size:0.78rem;text-decoration:none;border-bottom:1px dotted #58a6ff}}
.ml:hover{{border-bottom:1px solid #58a6ff}} .ml:hover{{border-bottom:1px solid #58a6ff}}
.ht{{display:none}} .ht{{display:none}}
.dr td{{background:#161b22;padding:10px 14px;border-bottom:2px solid #30363d}}
.dr code{{background:#1f2937;padding:1px 5px;border-radius:3px;font-size:0.78rem;color:#f0c674;white-space:nowrap}}
mark.hl{{background:#264f78;color:#f0f6fc;border-radius:2px;padding:0 2px}} mark.hl{{background:#264f78;color:#f0f6fc;border-radius:2px;padding:0 2px}}
.sr a{{color:#58a6ff;text-decoration:none;font-size:0.78rem}} .sr a{{color:#58a6ff;text-decoration:none;font-size:0.78rem}}
.c0{{width:24%}}.c1{{width:8%}}.c2{{width:12%}}.c3{{width:48%}}.c4{{width:8%}} .c0{{width:24%}}.c1{{width:8%}}.c2{{width:12%}}.c3{{width:48%}}.c4{{width:8%}}
@@ -429,6 +431,8 @@ const cnt = document.getElementById('cnt');
const vc = document.getElementById('vc'); const vc = document.getElementById('vc');
function s(i){{ function s(i){{
document.querySelectorAll('.dr').forEach(r => r.remove());
document.querySelectorAll('.ml').forEach(el => el.innerHTML = el.getAttribute('data-n') + ' more…');
if (col == i) desc = !desc; else {{ col = i; desc = i == 0; }} if (col == i) desc = !desc; else {{ col = i; desc = i == 0; }}
let rows = [...b.children]; let rows = [...b.children];
rows.sort((a,c)=>{{ rows.sort((a,c)=>{{
@@ -449,7 +453,21 @@ function s(i){{
function t(id,el){{ function t(id,el){{
let sp = document.getElementById(id); let sp = document.getElementById(id);
if (sp.classList.contains('ht')){{ sp.classList.remove('ht'); el.style.display='none'; }} let tr = el.closest('tr');
let nxt = tr.nextElementSibling;
if (nxt && nxt.classList.contains('dr')){{
nxt.remove();
el.innerHTML = el.getAttribute('data-n') + ' more…';
}} else {{
let dr = document.createElement('tr');
dr.className = 'dr';
let td = document.createElement('td');
td.colSpan = 5;
td.innerHTML = sp.innerHTML;
dr.appendChild(td);
tr.after(dr);
el.innerHTML = 'close ×';
}}
}} }}
function highlight(el, str) {{ function highlight(el, str) {{
@@ -496,14 +514,20 @@ q.addEventListener('input', ()=>{{
p.normalize(); p.normalize();
}}); }});
for (let r of rows) {{ for (let r of rows) {{
let ok = r.textContent.toLowerCase().includes(v); if (r.classList.contains('dr')) continue;
let txt = r.textContent.toLowerCase();
let ht = r.querySelector('.ht');
if (ht) txt += ' ' + ht.textContent.toLowerCase();
let ok = txt.includes(v);
r.style.display = ok ? '' : 'none'; r.style.display = ok ? '' : 'none';
let nxt = r.nextElementSibling;
if (nxt && nxt.classList.contains('dr')) nxt.style.display = ok ? '' : 'none';
if (ok && v) highlight(r, v); if (ok && v) highlight(r, v);
if (ok) vis++; if (ok) vis++;
}} }}
cnt.textContent = vis + ' / ' + rows.length; cnt.textContent = vis + ' / ' + rows.length;
vc.textContent = vis; vc.textContent = vis;
}}, 300); }}, 700);
}}); }});
</script> </script>
</body></html> </body></html>