sharect.js: Share Selected Text On Twitter & Facebook

sharect.js: Share Selected Text On Twitter & Facebook

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:

1npm install sharect

Basic usage:

Import  the minified version of the sharect library into your html document.

1<script src="dist/sharect.min.js"></script>

Initialize the sharect to make all your text within the document shareable.

1var sharect = new Sharect();
2sharect.init();

Enable / disable Twitter & Facebook shareing:

1sharect.config({
2facebook: true,
3twitter: true,
4twitterUsername: '@jqueryscript'
5}).init();

Set the background & icon colors:

1sharect.config({
2backgroundColor: '#333',
3iconColor: '#fff'
4}).init();

Changelog:

v1.0.2 (12/06/2018)

  • Fixed for IE 11

Author: estevanmaito

License: MIT

Demo: Link

Download: Github

Fancy you stumbling on my piece of the internet. Bonjour!

My name is Anmol and I'm the Blogger-In-Chief of this joint & working as the Chief Technology Officer at Azoora, Inc. I'm putting up my views here trying to help creative solopreneurs, developers & designers build their business using the power of websites, apps & social media, this, is, my jam.

If you're looking to start your own online business with a professional high quality website or mobile app, just get in touch. I'd be more than happy to assist.

SKYPE | FACEBOOK | LINKEDIN | TWITTER | EMAIL

Leave a Comment

Your email address will not be published. Required fields are marked *