Skip to content

HeavenDuke/hshare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hshare - a jQuery social sharing plugin

This is a social sharing plugin that allows web developers to include social sharing buttons/links with just some basic configuration. Existing platforms such as bshare/baidushare/jiathis uses HTTP protocol to fetch resources which makes it very hard to deploy such services on HTTPS pages due to security restriction. This is what triggers this project. Currently it still supports limited number of platform, but I believe that it will be better through time : )

Demo

Here is a demo of the our plugin:

demo picture

Furthur demo can be found on Codepen.

Supported Platforms

Platforms

Install

bower

bower install --save hshare

npm

npm install --save hshare

HTML

<link rel="stylesheet" href="hshare.min.css">
<script type="text/javascript" href="jquery.min.js"></script>
<script type="text/javascript" href="hshare.min.js"></script>

Usage

First specify a container in your html files like this:

<html>
    <head>
        <!-- something here -->
    </head>
    <body>
        <div id="container"></div>
        <!-- something here -->
    </body>
</html>

Then initialize the social sharing components in your JavaScript file like this:

$("#container").hshare();

You can also specify options for hshare like this:

$("#container").hshare({
	size: "large",
	copyLink: false,
	platforms: [{
		name: "wechat"
	}, {
		name: "qzone"
	}]
});

For further Documentation please refer to:

Contributors

License

MIT

About

social sharing plugin designed for http/https protocol

Resources

License

Stars

Watchers

Forks

Packages

No packages published