Created
November 29, 2017 15:41
-
-
Save AWare/8dbf985fd753f411cb380fece559b80e to your computer and use it in GitHub Desktop.
my bad hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [...document.querySelectorAll('p,span,a,h1,h2,h3')].filter(e =>e.textContent.length > 140 ).map((p,n) => { | |
| p.textContent = p.textContent.substring(0,(140 + 140 * Math.pow(Math.E,(-n/4)))) | |
| }) | |
| [...document.querySelectorAll('p,span,a,h1,h2,h3')].filter(e =>e.textContent.length > 10 ).map((p,n) => { p.textContent = "tldr;" }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment