ozdemirburak / jquery-floating-social-share Goto Github PK
View Code? Open in Web Editor NEWSocial media share buttons with counters.
License: MIT License
Social media share buttons with counters.
License: MIT License
Font awesome dependency can be removed with the usage of predefined inline svg with the help of the simple-icons package.
For instance, network property, Facebook can be extended like below where Facebook SVG can be found here.
"facebook" : {
className: "facebook",
icon: "<svg aria-labelledby='simpleicons-facebook-icon' role='img' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><title id='simpleicons-facebook-icon'>Facebook icon</title><path d='M22.676 0H1.324C.593 0 0 .593 0 1.324v21.352C0 23.408.593 24 1.324 24h11.494v-9.294H9.689v-3.621h3.129V8.41c0-3.099 1.894-4.785 4.659-4.785 1.325 0 2.464.097 2.796.141v3.24h-1.921c-1.5 0-1.792.721-1.792 1.771v2.311h3.584l-.465 3.63H16.56V24h6.115c.733 0 1.325-.592 1.325-1.324V1.324C24 .593 23.408 0 22.676 0'/></svg>",
url:"https://www.facebook.com/sharer/sharer.php?u={url}&t={title}"
},
Then just modify the source code that it will use the icon property or whatever instead of the font awesome one.
I'd really like to have the social buttons appear to the left of the main content. This is similar to top-left
but instead of being left: 0
(right against the edge of the browser), I'd like it to be to the left of the main content.
Below is an example taken from http://coschedule.com/blog/social-media-buttons/ (which uses a different share plugin).
Since jQuery is no longer needed for most cases, the package can be rewritten without jQuery dependency in ES6.
After that, the package will, of course, be renamed.
Hi,
if i set the position to top-right and hover over the buttons the whole sidebar (all buttons) moves to left.
I would expect that only the hovered button get bigger and all other buttons stay on the same position.
When clicking the share button it goes to a pinterest page saying "Whoops! We couldn’t find that page. How about these instead?"
var places = ["content-left", "content-right", "top-left", "top-right"],
networks = {
"mail": {
icon: "",
url: "mailto:?subject={url}"
},
"facebook" : {
icon: "",
url:"https://www.facebook.com/sharer/sharer.php?u={url}&t={title}"
},
"google-plus": {
icon: "",
url: "https://plus.google.com/share?url={url}"
},
"linkedin": {
icon: "",
url: "https://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}&summary={description}&source="
},
"odnoklassniki": {
icon: "",
url: "https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl={url}"
},
"pinterest": {
icon: "",
url: "https://pinterest.com/pin/create%2Fbutton/?url={url}&description={description}&media={media}"
},
"reddit": {
icon: "",
url: "https://www.reddit.com/submit?url={url}&title={title}"
},
"stumbleupon": {
icon: "",
url: "https://www.stumbleupon.com/submit?url={url}&title={title}"
},
"telegram": {
icon: "",
url: "https://telegram.me/share/url?text={title}&url={url}"
},
"tumblr": {
icon: "",
url: "https://www.tumblr.com/share/link?url={url}&name={title}&description={description}"
},
"twitter": {
icon: "",
url:"https://twitter.com/home?status={title}%20{url}"
},
"vk": {
icon: "",
url: "https://vk.com/share.php?url={url}&title={title}&description={description}"
},
"whatsapp": {
icon: "",
url: "whatsapp://send?text={title}%20{url}"
}
};
Many Thanks for this beautyful plugin.
Some problem with Viber to add it?
Hi,
Can you please add rel='noopener' to external links to fix Google Lighthouse errors like this: http://prntscr.com/iz6rda
https://developers.google.com/web/tools/lighthouse/audits/noopener
Thanks for the great plugin
Hello,
I've got a css issue while integrating you library because it define the following rule (https://github.com/ozdemirburak/jquery-floating-social-share/blob/master/src/jquery.floating-social-share.css#L8):
* {
box-sizing: border-box;
}
I was required to override that; i couldn't notice it was necessary?
PS: thanks for sharing your library.
Since jQuery is no longer preferred by most, the package needs to be rewritten without jQuery dependency in ES6.
After that, the package will be renamed.
window.addEventListener("orientationchange", function() {
setMobileCss(links);
checkPlacePosition($child, base.settings.place, base.element, base.settings.extra_offset);
updateIsMobile();
}, false);
}
i have kept the url as windown.location.href but it isnt working as google and facebook are giving errors. Please can you fix this asap?
#floatingSocialShare a { min-width: 45px; }
@media only screen and (min-device-width: 0px) and (max-width:961px) {
#floatingSocialShare a { min-width: 45px; }
}
@ozdemirburak
No console errors. Nothing.
just not showing the share icons.
Thanks for this great and simple plugin but there's a small problem that I noticed occurring on the console.
Although it doesn't affect functionality, I would like to know how would I be able to remove this error?
Failed to load resource: net::ERR_NAME_NOT_RESOLVED - https://urls.api.twitter.com/1/urls/count.json?url=someurl
Hello,
I was wondering if I can add an image to the pinterest share button? right now it just shared my sites description. I have open graph tags that facebook and google plus share buttons acknowledges but id like to adjust the pinterest one.
Thanks.
-Ann
Caught this error and the social share bar does not show up:
TypeError: v is undefined
jquery.floating-social-share.min.js:1:4681
jquery.floating-social-share.min.js?ver=0.0.1:3 Uncaught TypeError: Cannot read property 'data' of undefined
jquery.floating-social-share.min.js?ver=0.0.1:3 Uncaught TypeError: Cannot read property 'share_count' of undefined
You can find my site at: http://madetoburst.com/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.