Back to front pageView on Hacker News (opens in a new tab)Show HN: Bionic Reading – Formats text to make it faster to read (opens in a new tab)bionic-reading.com410 pointsby renato_casutt (on Hacker News)4 years agobionic-reading.com (opens in a new tab)Bionic Reading® for You.You are unique. Bionic Reading® is unique. And that’s a good thing. Because there is only one company and reading method called Bionic Reading®.Comments (271) 94 threadsShow all commentsShowing thread 6 of 94[-]phpnode4 years ago1 reply#Cool, here's a quick hack to try a similar technique with the comments in this thread (copy and paste into dev tools: $$('span.commtext').forEach(span => { const frag = document.createDocumentFragment(); span.textContent.split(/\s+/).forEach(word => { const len = Math.ceil(word.length * 0.3); const leading = document.createElement('strong'); leading.textContent = word.slice(0, len); const trailing = document.createTextNode(word.slice(len) + ' '); frag.appendChild(leading); frag.appendChild(trailing); }); span.parentNode.replaceChild(frag, span); })[-]hexomancer4 years ago2 replies#I made a version which works in all web pages, it is still very hacky though: function bionifyPage(){ function bionifyWord(word) { if (word.length == 1) { return word; } var numBold = Math.ceil(word.length * 0.3); // return "" + word.slice(0, numBold) + "" + + "" + word.slice(numBold) + ""; return "" + word.slice(0, numBold) + "" + "" + word.slice(numBold) + ""; } function bionifyText(text) { var res = ""; if (text.length < 10) { return text; } for (var word of text.split(" ")) { res += bionifyWord(word) + " "; } return res; } function bionifyNode(node) { if (node.tagName == 'SCRIPT') return; if ((node.childNodes == undefined) || (node.childNodes.length == 0)) { if ((node.textContent != undefined) && (node.tagName == undefined)) { var newNode = document.createElement('span'); var bionifiedText = bionifyText(node.textContent) newNode.innerHTML = bionifiedText; if (node.textContent.length > 20){ node.replaceWith(newNode); } } } else { for (var child of node.childNodes) { bionifyNode(child); } } } bionifyNode(document.body); }[-]phpnode4 years ago1 reply#I think yours infringes the patent ;)hexomancer4 years ago2 replies#Alright, I modified it to be like the original comment.Continue this thread — 2 replies[-]w-m4 years ago1 reply#Could you make one that reduces the opacity of the second half of the word, while keeping the same boldness for the complete text, to compare the effect?hexomancer4 years ago#I have made a chrome extension that does that: https://github.com/ahrm/chrome-fastreadYou can customize the css attributes of highlighted text and rest of the word using the two input texts.
Show HN: Bionic Reading – Formats text to make it faster to read (opens in a new tab)bionic-reading.com410 pointsby renato_casutt (on Hacker News)4 years ago
phpnode4 years ago1 reply#Cool, here's a quick hack to try a similar technique with the comments in this thread (copy and paste into dev tools: $$('span.commtext').forEach(span => { const frag = document.createDocumentFragment(); span.textContent.split(/\s+/).forEach(word => { const len = Math.ceil(word.length * 0.3); const leading = document.createElement('strong'); leading.textContent = word.slice(0, len); const trailing = document.createTextNode(word.slice(len) + ' '); frag.appendChild(leading); frag.appendChild(trailing); }); span.parentNode.replaceChild(frag, span); })
hexomancer4 years ago2 replies#I made a version which works in all web pages, it is still very hacky though: function bionifyPage(){ function bionifyWord(word) { if (word.length == 1) { return word; } var numBold = Math.ceil(word.length * 0.3); // return "" + word.slice(0, numBold) + "" + + "" + word.slice(numBold) + ""; return "" + word.slice(0, numBold) + "" + "" + word.slice(numBold) + ""; } function bionifyText(text) { var res = ""; if (text.length < 10) { return text; } for (var word of text.split(" ")) { res += bionifyWord(word) + " "; } return res; } function bionifyNode(node) { if (node.tagName == 'SCRIPT') return; if ((node.childNodes == undefined) || (node.childNodes.length == 0)) { if ((node.textContent != undefined) && (node.tagName == undefined)) { var newNode = document.createElement('span'); var bionifiedText = bionifyText(node.textContent) newNode.innerHTML = bionifiedText; if (node.textContent.length > 20){ node.replaceWith(newNode); } } } else { for (var child of node.childNodes) { bionifyNode(child); } } } bionifyNode(document.body); }
w-m4 years ago1 reply#Could you make one that reduces the opacity of the second half of the word, while keeping the same boldness for the complete text, to compare the effect?
hexomancer4 years ago#I have made a chrome extension that does that: https://github.com/ahrm/chrome-fastreadYou can customize the css attributes of highlighted text and rest of the word using the two input texts.
Comments (271) 94 threads
Show all comments
Showing thread 6 of 94
Continue this thread — 2 replies
You can customize the css attributes of highlighted text and rest of the word using the two input texts.