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 bower

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"
    }]
});

Furthur Demo & Documentation is shown below:

Contributors

License

MIT