cybardev / ReadAble

A JavaScript library to make text on your websites quicker to read.

Home Page:http://readable.cybar.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReadAble

A JavaScript library to make text on your websites quicker to read.

Example

Live website: https://readable.cybar.dev

screenshot

Check the example/ directory for code.

Usage

CDN

Add this to your HTML before any other script tags:

<script async src="https://cdn.jsdelivr.net/gh/cybardev/ReadAble@v2/readable.js"></script>

Manual

  • download readable.js
  • place readable.js in your project adjacent to other script files
  • include it in HTML via <script> tag

Customization

In your JS script file, pass in a config object as parameter to the ReadAble constructor:

const config = {
    identifier: ".readable",
    fontWeight: 800,
    fontColor: "black",
    fontSize: "1em",
    scaleAll: true,
};

let rdbl = new ReadAble(config);

Adjust the values to control the first letters' style.

PS: font* values are CSS styles; identifier is a CSS selector. Check source code to see how they're used. Default values will be used if no parameter is given.

Credits

About

A JavaScript library to make text on your websites quicker to read.

http://readable.cybar.dev/

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%