All Projects → Cople → SocialSharer

Cople / SocialSharer

Licence: MIT License
最 Pure 的社会化分享按钮

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to SocialSharer

vue-socials
💬 Social media share buttons and counts for Vue.js
Stars: ✭ 32 (+77.78%)
Mutual labels:  share, share-buttons, social-buttons
jQuery-Awesome-Sosmed-Share-Button
Awesome Social Media Share Button With Share Count
Stars: ✭ 58 (+222.22%)
Mutual labels:  share, social-buttons
browndust-share
This website is for browndust formation sharing
Stars: ✭ 18 (+0%)
Mutual labels:  share
Valheim-ServerSideMap
This plugin completely moves the explored map and created pins to the server. As clients explore, they will send their explored areas to the server who will then distribute it to all connected clients. When a client joins, the server will synchronize the currently explored areas to the client. Pins are shared as well but default to false and nee…
Stars: ✭ 32 (+77.78%)
Mutual labels:  share
OneClip
Share your clipboard with people nearby. No Setup, No Signup.
Stars: ✭ 45 (+150%)
Mutual labels:  share
react-custom-share
Social media share buttons for ReactJS. Use one of the built-in button themes or create a custom one from scratch.
Stars: ✭ 47 (+161.11%)
Mutual labels:  share
Godot-Share
Simple share text and/or image module for Godot Engine (Android & iOS)
Stars: ✭ 58 (+222.22%)
Mutual labels:  share
smbaudit
Perform various SMB-related attacks, particularly useful for testing large Active Directory environments.
Stars: ✭ 31 (+72.22%)
Mutual labels:  share
ShareIntentBuilder
Share Intent Builder - Android Library for the type-safe creation of Share Intents.
Stars: ✭ 45 (+150%)
Mutual labels:  share
netflix-list-exporter
💫‎‎‎‏‏‎ An Extension to export your lists from Netflix to Clipboard area and share it with your friends.
Stars: ✭ 60 (+233.33%)
Mutual labels:  share
go-http-file-server
Simple command line based HTTP file server to share local file system
Stars: ✭ 90 (+400%)
Mutual labels:  share
godot-custom-mobile-template
Godot Game Engine Custom Mobile Template
Stars: ✭ 70 (+288.89%)
Mutual labels:  share
linkcast
Share links, images, blogs and everything on the web with your friends in one click using this chrome extension Linkcast
Stars: ✭ 13 (-27.78%)
Mutual labels:  share
sharethis-reactjs
Official ShareThis Social Media Sharing Buttons For React.js
Stars: ✭ 32 (+77.78%)
Mutual labels:  share
TJU-CourseSharing
天津大学课程共享计划
Stars: ✭ 87 (+383.33%)
Mutual labels:  share
sharestapp
Sharestapp lets you to directly share an image/videos/reels post from Instagram to other apps and also allows to save.
Stars: ✭ 13 (-27.78%)
Mutual labels:  share
Pix
🎨 Pix is an online pixel art community where everyone can unleash their creativity on a 16x16 canvas, built with React-Native for iOS devices. 🚀
Stars: ✭ 86 (+377.78%)
Mutual labels:  share
cockpit-samba-manager
A Cockpit plugin to manage Samba shares and users.
Stars: ✭ 28 (+55.56%)
Mutual labels:  share
qr
🔲 Generate QR Codes straight in your terminal!
Stars: ✭ 34 (+88.89%)
Mutual labels:  share
videojs-share
Share plugin for video.js
Stars: ✭ 24 (+33.33%)
Mutual labels:  share

SocialSharer

最 Pure 的社会化分享按钮

演示

DEMO

安装

npm install social-sharer --save

使用

<!-- HTML -->
<div class="social-sharer"></div>

<!-- CSS (optional) -->
<link href="../dist/social-sharer.min.css">

<!-- JS -->
<script src="../dist/social-sharer.min.js"></script>
<script>
var socialSharer = new SocialSharer(".social-sharer");
</script>

<!-- jQuery -->
<script src="../dist/jquery.social-sharer.min.js"></script>
<script>
$(".social-sharer").socialSharer();
</script>

如果元素内包含带 data-service 属性的元素,插件会直接使用这些元素,并忽选项中的services 参数:

<div class="social-sharer">
    <a data-service="weibo"     title="分享到微博"></a>
    <a data-service="wechat"    title="分享到微信"></a>
    <a data-service="qq"        title="分享给QQ好友"></a>
    <a data-service="yingxiang" title="分享到印象笔记"></a>
</div>

选项

参数 类型 默认值 描述
url string "" 网址,dataset.url > meta[property="og:url"] > link[rel="canonical"] > location.href
title string "" 标题,dataset.title > meta[property="og:title"] > document.title
description string "" 描述,dataset.description > meta[property="og:description"] > meta[name="description"]
pic string "" 图片,dataset.pic > meta[property="og:image"] > document.images[0]
source string "" 网站名称,meta[property="og:site_name"]
weiboKey string "" 显示微博来源的 AppKey
twitterVia string "" Twitter 参数
twitterHashTags string "" 参见:https://dev.twitter.com/web/tweet-button/web-intent
wechatTitle string "分享到微信" 微信二维码标题
wechatTip string "用微信「扫一扫」上方二维码即可。" 微信二维码提示文字
qrcodeSize number 260 微信二维码尺寸
services array ["weibo", "wechat", "qzone", "qq", "douban", "yingxiang"] 要使用的服务列表,目前支持:weibo, wechat, qzone, qq, douban, yingxiang, renren, facebook, twitter, gplus, linkedin, evernote, email, webshare
classNamePrefix string "icon icon-" 分享图标的 CSS 类前缀
onRender function null 生成分享图标后会调用该函数,参数:icon:element, serviceName:string
onClick function null 点击分享图标后会调用该函数,参数:event:object, serviceName:string

你可以通过给元素设置 data-* 属性来设置对应选项(function类型除外)。例如:

<div class="social-sharer" data-title="标题" data-weibo-key="1234567" data-services="qq,weibo,linkedin"></div>

方法

静态方法

SocialSharer.addService(serviceName:string, urlTemplate:string)

添加服务

实例方法

getURL(serviceName:string)

返回服务的分享地址(微信返回二维码地址)

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].