Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
- Fix for local storage - thanks @danfoley
- Default to formatted numbers - e.g. 1K rather than 1000
  • Loading branch information
Sam Potts committed Oct 2, 2017
1 parent e997cc9 commit 788e2c0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 18 deletions.
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## v1.0.5
- Fix for local storage - thanks @danfoley
- Default to formatted numbers - e.g. 1K rather than 1000

## v1.0.4
- Small bug fix

## v1.0.3
- Small bug fix

## v1.0.2
- Security fix

Expand Down
2 changes: 1 addition & 1 deletion dist/shr.js

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

15 changes: 3 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shr",
"version": "1.0.4",
"version": "1.0.5",
"description": "Simple, customizable sharing buttons",
"homepage": "http://shr.one",
"main": "gulpfile.js",
Expand All @@ -27,20 +27,11 @@
"scripts": {
"preinstall": "npm install -g gulp"
},
"keywords": [
"Facebook",
"Twitter",
"Pinterest",
"Google Plus",
"Sharing",
"Share buttons"
],
"keywords": ["Facebook", "Twitter", "Pinterest", "Google Plus", "Sharing", "Share buttons"],
"repository": {
"type": "git",
"url": "git://github.com/sampotts/shr.git"
},
"authors": [
"Sam Potts <[email protected]>"
],
"authors": ["Sam Potts <[email protected]>"],
"license": "MIT"
}
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Check `docs/index.html` and `docs/dist/docs.js` for an example setup.
If you want to use our CDN, you can use the following:

```html
<link rel="stylesheet" href="https://cdn.shr.one/1.0.4/shr.css">
<script src="https://cdn.shr.one/1.0.4/shr.js"></script>
<link rel="stylesheet" href="https://cdn.shr.one/1.0.5/shr.css">
<script src="https://cdn.shr.one/1.0.5/shr.js"></script>
```

### CSS
Expand Down
4 changes: 1 addition & 3 deletions src/js/shr.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
count: {
classname: 'share-count', // Classname for the share count
displayZero: true, // Display zero values
format: false, // Display 1000 as 1K, 1000000 as 1M, etc
format: true, // Display 1000 as 1K, 1000000 as 1M, etc
position: 'after', // Inject the count before or after the link in the DOM
html: function(count, classname) {
return '<span class="' + classname + '">' + count + '</span>';
Expand Down Expand Up @@ -85,8 +85,6 @@
} catch (e) {
return false;
}

return false;
})(),
ttl: 300000 // 5 minutes in milliseconds
},
Expand Down

0 comments on commit 788e2c0

Please sign in to comment.