From 6dcf53ebd992fbe09bc38d19873f13e8657f0f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ellison=20Lea=CC=83o?= Date: Sat, 20 Feb 2016 17:43:02 -0200 Subject: [PATCH] bump version --- package.js | 2 +- package.json | 2 +- sharer.js | 2 +- sharer.min.js | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.js b/package.js index 5c512ea..90805ad 100644 --- a/package.js +++ b/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ellisonleao:sharerjs', - version: '0.2.12', + version: '0.2.13', summary: 'Create your own social share buttons', git: 'git://github.com/ellisonleao/sharer.js', documentation: 'README.md' diff --git a/package.json b/package.json index 1c7cf0a..78e2731 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sharer.js", - "version": "0.2.12", + "version": "0.2.13", "description": "Create custom social share DOM elements. No dependencies.", "main": "sharer.js", "repository": { diff --git a/sharer.js b/sharer.js index fb42875..1e3b820 100644 --- a/sharer.js +++ b/sharer.js @@ -3,7 +3,7 @@ * Sharer.js * * @description Create your own social share buttons - * @version 0.2.12 + * @version 0.2.13 * @author Ellison Leao * @license GPLv3 * diff --git a/sharer.min.js b/sharer.min.js index 119a596..ee1d4f7 100644 --- a/sharer.min.js +++ b/sharer.min.js @@ -3,9 +3,9 @@ * Sharer.js * * @description Create your own social share buttons - * @version 0.2.12 + * @version 0.2.13 * @author Ellison Leao * @license GPLv3 * */ -!function(e,t){"use strict";var r=function(e){this.elem=e};r.prototype={getValue:function(e){var t=this.elem.getAttribute("data-"+e);return void 0===t||null===t?"":t},share:function(){var e,t,r=this.getValue("sharer").toLowerCase(),u=this,l={facebook:function(){e="https://www.facebook.com/sharer/sharer.php",t={u:u.getValue("url")},u.urlSharer(e,t)},googleplus:function(){e="https://plus.google.com/share",t={url:u.getValue("url")},u.urlSharer(e,t)},linkedin:function(){e="https://www.linkedin.com/shareArticle",t={url:u.getValue("url"),mini:!0},u.urlSharer(e,t)},twitter:function(){var r=u.getValue("via");e="https://twitter.com/intent/tweet/",t={text:u.getValue("title"),url:u.getValue("url"),hashtags:u.getValue("hashtags")},r&&(t.via=r),u.urlSharer(e,t)},email:function(){var r=u.getValue("subject");e="mailto:"+u.getValue("to"),t={subject:r,body:r+"\n"+u.getValue("title")+"\n"+u.getValue("url")},u.urlSharer(e,t,!0)},whatsapp:function(){e="whatsapp://send",t={text:u.getValue("title")+" "+u.getValue("url")},u.urlSharer(e,t,!0)},telegram:function(){e="tg://msg_url",t={text:u.getValue("title")+" "+u.getValue("url")},u.urlSharer(e,t,!0)},viber:function(){e="viber://forward",t={text:u.getValue("title")+" "+u.getValue("url")},u.urlSharer(e,t,!0)},line:function(){var t=u.getValue("title")+" "+u.getValue("url");e="http://line.me/R/msg/text/?"+encodeURIComponent(t),u.urlSharer(e,{},!0)},pinterest:function(){e="https://www.pinterest.com/pin/create/button/",t={url:u.getValue("url")},u.urlSharer(e,t)},tumblr:function(){e="http://tumblr.com/widgets/share/tool",t={canonicalUrl:u.getValue("url"),content:u.getValue("url"),posttype:"link",title:u.getValue("title"),caption:u.getValue("caption"),tags:u.getValue("tags")},u.urlSharer(e,t)},hackernews:function(){e="https://news.ycombinator.com/submitlink",t={u:u.getValue("url"),t:u.getValue("title")},u.urlSharer(e,t)},reddit:function(){e="https://www.reddit.com/submit",t={url:u.getValue("url")},u.urlSharer(e,t)},vk:function(){e="http://vk.com/share.php",t={url:u.getValue("url"),title:u.getValue("title"),description:u.getValue("caption"),image:u.getValue("picture")},u.urlSharer(e,t)},xing:function(){e="https://www.xing.com/app/user",t={op:"share",url:u.getValue("url"),title:u.getValue("title")},u.urlSharer(e,t)},buffer:function(){e="https://buffer.com/add",t={url:u.getValue("url"),title:u.getValue("title"),via:u.getValue("twitter-username"),picture:u.getValue("picture")},u.urlSharer(e,t)},instapaper:function(){var r=u.getValue("title")+" "+u.getValue("url");e="http://www.instapaper.com/text",t={u:r},u.urlSharer(e,t,!0)},pocket:function(){e="https://getpocket.com/save",t={url:u.getValue("url"),title:u.getValue("title")},u.urlSharer(e,t)},digg:function(){e="http://www.digg.com/submit",t={url:u.getValue("url")},u.urlSharer(e,t)},stumbleupon:function(){e="http://www.stumbleupon.com/submit",t={url:u.getValue("url"),title:u.getValue("title")},u.urlSharer(e,t)},flipboard:function(){e="https://share.flipboard.com/bookmarklet/popout",t={v:2,title:u.getValue("title"),url:u.getValue("url"),t:Date.now()},u.urlSharer(e,t)},weibo:function(){e="http://service.weibo.com/share/share.php",t={url:u.getValue("url"),title:u.getValue("title"),language:"zh_cn"},u.urlSharer(e,t)},renren:function(){e="http://share.renren.com/share/buttonshare",t={link:u.getValue("url")},u.urlSharer(e,t)},myspace:function(){e="https://myspace.com/post",t={u:u.getValue("url"),t:u.getValue("title"),c:u.getValue("description")},u.urlSharer(e,t)},blogger:function(){e="https://www.blogger.com/blog-this.g",t={u:u.getValue("url"),n:u.getValue("title"),t:u.getValue("description")},u.urlSharer(e,t)},baidu:function(){e="http://cang.baidu.com/do/add",t={it:u.getValue("title"),iu:u.getValue("url")},u.urlSharer(e,t)},"default":function(){}};return(l[r]||l["default"])()},urlSharer:function(t,r,u){var l,a="object"==typeof r?r:{},n=Object.keys(a),i=n.length>0?"?":"";for(l=0;lu;u++)l[u].addEventListener("click",e)})}(window,document); +!function(t,e){"use strict";var a=function(t){this.elem=t};a.prototype={getValue:function(t){var e=this.elem.getAttribute("data-"+t);return void 0===e||null===e?!1:e},share:function(){var t=this.getValue("sharer").toLowerCase(),e={facebook:{shareUrl:"https://www.facebook.com/sharer/sharer.php",params:{u:this.getValue("url")}},googleplus:{shareUrl:"https://plus.google.com/share",params:{url:this.getValue("url")}},linkedin:{shareUrl:"https://www.linkedin.com/shareArticle",params:{url:this.getValue("url"),mini:!0}},twitter:{shareUrl:"https://twitter.com/intent/tweet/",params:{text:this.getValue("title"),url:this.getValue("url"),hashtags:this.getValue("hashtags"),via:this.getValue("via")}},email:{shareUrl:"mailto:"+this.getValue("to"),params:{subject:this.getValue("subject"),body:this.getValue("subject")+"\n"+this.getValue("title")+"\n"+this.getValue("url")},isLink:!0},whatsapp:{shareUrl:"whatsapp://send",params:{text:this.getValue("title")+" "+this.getValue("url")},isLink:!0},telegram:{shareUrl:"tg://msg_url",params:{text:this.getValue("title")+" "+this.getValue("url")},isLink:!0},viber:{shareUrl:"viber://forward",params:{text:this.getValue("title")+" "+this.getValue("url")},isLink:!0},line:{shareUrl:"http://line.me/R/msg/text/?"+encodeURIComponent(this.getValue("title")+" "+this.getValue("url")),isLink:!0},pinterest:{shareUrl:"https://www.pinterest.com/pin/create/button/",params:{url:this.getValue("url")}},tumblr:{shareUrl:"http://tumblr.com/widgets/share/tool",params:{canonicalUrl:this.getValue("url"),content:this.getValue("url"),posttype:"link",title:this.getValue("title"),caption:this.getValue("caption"),tags:this.getValue("tags")}},hackernews:{shareUrl:"https://news.ycombinator.com/submitlink",params:{u:this.getValue("url"),t:this.getValue("title")}},reddit:{shareUrl:"https://www.reddit.com/submit",params:{url:this.getValue("url")}},vk:{shareUrl:"http://vk.com/share.php",params:{url:this.getValue("url"),title:this.getValue("title"),description:this.getValue("caption"),image:this.getValue("picture")}},xing:{shareUrl:"https://www.xing.com/app/user",params:{op:"share",url:this.getValue("url"),title:this.getValue("title")}},buffer:{shareUrl:"https://buffer.com/add",params:{url:this.getValue("url"),title:this.getValue("title"),via:this.getValue("via"),picture:this.getValue("picture")}},instapaper:{shareUrl:"http://www.instapaper.com/edit",params:{url:this.getValue("url"),title:this.getValue("title"),description:this.getValue("description")}},pocket:{shareUrl:"https://getpocket.com/save",params:{url:this.getValue("url")}},digg:{shareUrl:"http://www.digg.com/submit",params:{url:this.getValue("url")}},stumbleupon:{shareUrl:"http://www.stumbleupon.com/submit",params:{url:this.getValue("url"),title:this.getValue("title")}},flipboard:{shareUrl:"https://share.flipboard.com/bookmarklet/popout",params:{v:2,title:this.getValue("title"),url:this.getValue("url"),t:Date.now()}},weibo:{shareUrl:"http://service.weibo.com/share/share.php",params:{url:this.getValue("url"),title:this.getValue("title"),language:"zh_cn"}},renren:{shareUrl:"http://share.renren.com/share/buttonshare",params:{link:this.getValue("url")}},myspace:{shareUrl:"https://myspace.com/post",params:{u:this.getValue("url"),t:this.getValue("title"),c:this.getValue("description")}},blogger:{shareUrl:"https://www.blogger.com/blog-this.g",params:{u:this.getValue("url"),n:this.getValue("title"),t:this.getValue("description")}},baidu:{shareUrl:"http://cang.baidu.com/do/add",params:{it:this.getValue("title"),iu:this.getValue("url")}}},a=e[t];return a&&(a.width=this.getValue("width"),a.height=this.getValue("height")),void 0!==a?this.urlSharer(a):!1},urlSharer:function(e){var a,r=e.params||{},s=Object.keys(r),l=s.length>0?"?":"";for(a=0;ar;r++)s[r].addEventListener("click",t)})}(window,document);