Skip to content

Commit

Permalink
Fix google-plus counter, use opensharecount for twitter counters, v1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ozdemirburak committed May 6, 2016
1 parent f082b7c commit 1c39d88
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 45 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Or install via npm and include from your `node_modules` folder
Or install via <a target="_blank" href="https://github.com/ozdemirburak/jquery-floating-social-share/archive/master.zip">zip</a>, then include jQuery and Font-Awesome and the plugin on a page.

```html
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.2/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="dist/jquery.floating-social-share.min.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="dist/jquery.floating-social-share.min.js"></script>
Expand Down Expand Up @@ -51,6 +51,7 @@ To make the social share buttons appear next to the specific content, instead of

* **place**: `String` *(`top-left` by default)* Set the position of the box. Currently: `content-left`, `top-left` and `top-right` are available.
* **counter**: `Boolean` *(`true` by default)* Set to `false` to hide counters that appear below the buttons.
* **twitter_counter**: `Boolean` *(`false` by default)* Set to `true` to show twitter counter, but you also need to register to [Open Share Count](https://opensharecount.com/) since Twitter API does not provide counters without an API key.
* **buttons**: `Array` *(`["facebook", "twitter", "google-plus"]` by default)* Sets the social buttons for sharing. Available ones are `envelope`, `facebook`, `google-plus`, `linkedin`, `odnoklassniki`, `pinterest`, `reddit`, `stumbleupon`, `tumblr`, `twitter` and `vk`
* **title**: `String` *(`document.title` by default)* Sets the title for the share message.
* **url**: `String` *(`window.location.href` by default)* Sets the url for the share message.
Expand All @@ -66,6 +67,7 @@ To make the social share buttons appear next to the specific content, instead of
$("body").floatingSocialShare({
place: "top-left", // alternatively content-left, top-right
counter: true, // set to false for hiding the counters of buttons
twitter_counter: false, // Twitter API does not provide counters without API key, register to https://opensharecount.com/
buttons: ["envelope", "facebook", "google-plus", "linkedin", "odnoklassniki", "pinterest", "reddit", "stumbleupon", "tumblr", "twitter", "vk"], // all of the currently avalaible social buttons
title: document.title, // your title, default is current page's title
url: window.location.href, // your url, default is current page's url
Expand Down
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-floating-social-share",
"version": "1.2.0",
"version": "1.2.1",
"homepage": "http://github.com/ozdemirburak/jquery-floating-social-share",
"authors": [
"Burak Ozdemir <https://github.com/ozdemirburak>"
Expand Down Expand Up @@ -30,7 +30,7 @@
],
"description": "social media share buttons with counters",
"dependencies": {
"jquery": "~1.11.1",
"font-awesome": "~4.4.0"
"jquery": ">=1.8",
"font-awesome": ">=4.0"
}
}
6 changes: 3 additions & 3 deletions demo/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta property="og:description" name="description" content="Floating Social Share Buttons">
<meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/d/d6/Hs-2009-25-e-full_jpg.jpg">
<title>jQuery Floating Social Share</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.2/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../src/jquery.floating-social-share.css" />
</head>
<body>
Expand All @@ -23,8 +23,8 @@
buttons: ["facebook", "twitter", "google-plus", "linkedin", "pinterest"],
text: "share with: ",
place: "content-left",
url: "https://google.com"
url: "http://google.com"
});
</script>
</body>
</html>
</html>
7 changes: 4 additions & 3 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta property="og:description" name="description" content="Floating Social Share Buttons">
<meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/d/d6/Hs-2009-25-e-full_jpg.jpg">
<title>jQuery Floating Social Share</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.2/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../src/jquery.floating-social-share.css" />
</head>
<body>
Expand All @@ -21,9 +21,10 @@
<script>
$("body").floatingSocialShare({
buttons: ["facebook", "twitter", "google-plus", "linkedin", "pinterest"],
twitter_counter: true,
text: "share with: ",
url: "https://google.com"
url: "http://google.com"
});
</script>
</body>
</html>
</html>
8 changes: 1 addition & 7 deletions dist/jquery.floating-social-share.min.css

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

8 changes: 1 addition & 7 deletions dist/jquery.floating-social-share.min.js

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-floating-social-share",
"version": "1.2.0",
"version": "1.2.1",
"description": "social media share buttons with counters",
"main": [
"dist/jquery-floating-social-share.min.js",
Expand All @@ -11,8 +11,8 @@
"url": "https://github.com/ozdemirburak/jquery-floating-share-plugin.git"
},
"devDependencies": {
"jquery": "~1.11.1",
"font-awesome": "~4.4.0"
"jquery": ">=1.8",
"font-awesome": ">=4.0"
},
"keywords": [
"social",
Expand Down
2 changes: 1 addition & 1 deletion src/jquery.floating-social-share.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery Floating Social Share Plugin v1.1.1
* jQuery Floating Social Share Plugin v1.2.1
* http://burakozdemir.co.uk
* Burak Ozdemir - <https://github.com/ozdemirburak>
* Released under the MIT license
Expand Down
Loading

0 comments on commit 1c39d88

Please sign in to comment.