Skip to content

Instantly share code, notes, and snippets.

@umutbasal
Created May 21, 2022 18:13
Show Gist options
  • Save umutbasal/42ac7d4cafa67e9b1dc759426e0e29a3 to your computer and use it in GitHub Desktop.
Save umutbasal/42ac7d4cafa67e9b1dc759426e0e29a3 to your computer and use it in GitHub Desktop.
bookmark for bionic reading
javascript:(()=>{let e,t=document.getElementsByTagName("p"),n=document.getElementsByTagName("font");e=t.length>n.length?t:n;var o=document.createElement("style");o.textContent="b { font-weight: bold; !important }",document.head.appendChild(o);for(let t of e){const e=t.innerText.split(" ").map((e=>{const t=e.length,n=Math.round(t/2);return`<b>${e.slice(0,n)}</b>${e.slice(n)}`}));t.innerHTML=e.join(" ")}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment