SPB Git forge
3commits 1branches 0releases
2.9 MBsize
maindefault branch
1 h agolast push
HTML 57.2% Shell 19.1% Python 11.2% CSS 7.4% JavaScript 5.1%
597 B · 14 lines javascript
Raw Blame History
1(function(){2  const out = {url: location.href, title: document.title};3  const fr = document.querySelector('iframe');4  out.iframe = fr ? fr.src : null;5  try {6    const d = fr.contentDocument;7    out.iframeReady = d.readyState;8    out.h = [...d.querySelectorAll('h1,h2,h3')].map(e=>e.textContent.trim()).filter(Boolean).slice(0,15);9    out.buttons = [...d.querySelectorAll('button, a.oui-button, a[role=button]')].map(e=>e.textContent.trim()).filter(Boolean).slice(0,60);10    out.text = d.body.innerText.slice(0,1500);11  } catch(e){ out.err = String(e); }12  return JSON.stringify(out);13})()14