DEV Community

Pipat Sampaokit
Pipat Sampaokit

Posted on • Edited on

2 1

Poor Man's Bionic Reading

I find that Bionic Reading is super cool. But their Chrome extension is not quite pleasant to use.

So I create a quick extension. But the algorithm is not as complex as the original one. This extension simply "bionifies" 60% of word length.


function bionifyText(text) {
  const words = text.split(/\s+/);
  return words.map(bionifyWord).join(" ");
}

function bionifyWord(word) {
  const wordLength = word.length;
  const numBionifiedCharacters = Math.floor((wordLength * 60) / 100);
  const bionifiedToken = word.slice(0, numBionifiedCharacters);
  const theRest = word.slice(numBionifiedCharacters);
  return `<b>${bionifiedToken}</b>${theRest}`;
}
Enter fullscreen mode Exit fullscreen mode

How to use

  1. Clone the repository
  2. Open Chrome and go to chrome://extensions/
  3. Enable Developer Mode (probably at the top right corner)
  4. Click "Load unpacked" and choose the repository root directory
  5. Open any website, highlight the text you want to bionify
  6. Right click, choose "bionify", and boom!

How to customize

Change the implementation of the function bionifyWord in bionify.js however you like, go back to chrome://extensions/ and click the reload icon

Example Usage

example usage

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay