Skip to content

Commit

Permalink
Cleanup and create new version
Browse files Browse the repository at this point in the history
  • Loading branch information
wcoder committed Sep 5, 2021
1 parent fd020b4 commit 75825c1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Simple, powerful, customizable and super lightweight (1 Kb Gzip) social buttons

## Install

NPM:
### Available in NPM

```sh
npm i share-buttons
Expand All @@ -28,6 +28,12 @@ include `share-buttons.js` in the end of page:
<script src="<path>/dist/share-buttons.js"></script>
```

### Getting the library from CDN

```html
<script src="//cdn.jsdelivr.net/npm/share-buttons/dist/share-buttons.js"></script>
```

Paste this HTML on the page:

``` html
Expand Down Expand Up @@ -113,4 +119,4 @@ You can also use [simple-icons](https://github.com/simple-icons/simple-icons).

----

&copy; 2015 - 2020 Yauheni Pakala
&copy; 2015+ Yauheni Pakala and [contributors](https://github.com/wcoder/share-buttons/graphs/contributors) | MIT
2 changes: 1 addition & 1 deletion dist/share-buttons.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "share-buttons",
"version": "1.7.0",
"version": "1.8.0",
"description": "Simple social buttons for your site.",
"directories": {
"example": "example"
Expand Down
9 changes: 3 additions & 6 deletions src/share-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@

/**
* Class to display the buttons of social networks.
*
* @author Yauheni Pakala <https://wcoder.github.io>
* @version 1.6
* @license MIT
*/
function ShareButtons() {

Expand Down Expand Up @@ -140,12 +136,13 @@
* Counter for generated cache's share button's index.
* This to reference added share buttons' listeners.
*/
var refCounter = 0
var refCounter = 0;

/**
* List of added listeners' for share buttons.
* This to index listeners' for update or removal purpose.
*/
var listenersCache = {}
var listenersCache = {};

/**
* Method for detaching event to the element
Expand Down

0 comments on commit 75825c1

Please sign in to comment.