Skip to content

Instantly share code, notes, and snippets.

@sifex
Last active September 15, 2022 08:14
Show Gist options
  • Select an option

  • Save sifex/a289cc2a710a7870057266064d2e3534 to your computer and use it in GitHub Desktop.

Select an option

Save sifex/a289cc2a710a7870057266064d2e3534 to your computer and use it in GitHub Desktop.
Add 30% to body text
javascript: (() => { l="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus malesuada turpis at sem placerat interdum. Suspendisse vel orci vestibulum, rutrum neque eu, dictum eros. In hac habitasse platea dictumst.",getMoreText=e=>l.slice(0,.3*e.length),[...document.querySelector("body").querySelectorAll("p,span,h1,h2,h3,h4,h5,h6,a,button")].filter(e=>-1!=e.textContent.trim().indexOf(" ")).forEach(e=>e.innerHTML+=" "+getMoreText(e.textContent)); })();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment