| Author: | estevanmaito |
|---|---|
| Views Total: | 2,077 views |
| Official Page: | Go to website |
| Last Update: | February 6, 2020 |
| License: | MIT |
Preview:

Description:
sharect.js is a lightweight, zero-dependency JS library that converts any selected text into shareable quotes, which are allowed to share on Twitter and/or Facebook, as you seen in Medium.com.
Install the Sharect via NPM:
npm install sharect
Basic usage:
Import the minified version of the sharect library into your HTML document.
<script src="dist/sharect.min.js"></script>
Initialize the sharect to make all your text within the document shareable.
var sharect = new Sharect(); sharect.init();
Enable / disable Twitter & Facebook sharing:
sharect.config({
facebook: true,
twitter: true,
twitterUsername: '@jqueryscript'
}).init();Set the background & icon colors:
sharect.config({
backgroundColor: '#333',
iconColor: '#fff'
}).init();Define the elements that can be selected.
sharect.config({
selectableElements: ['body']
}).init();Changelog:
v2.0.0 (02/06/2020)
- Update
v1.1.0 (03/23/2019)
- Add selectableElements
v1.0.2 (12/06/2018)
- Fixed for IE 11







