vue-social-sharing
Advanced tools
Comparing version 2.2.6 to 2.2.7
@@ -0,1 +1,6 @@ | ||
<a name="2.2.7"></a> | ||
# [2.2.7](https://github.com/nicolasbeauvais/vue-social-sharing/compare/2.2.6...2.2.7) (2017-10-03) | ||
- Add link to SMS and Email sharing | ||
- Fix twitter sharing (missing "via=") | ||
<a name="2.2.6"></a> | ||
@@ -2,0 +7,0 @@ # [2.2.6](https://github.com/nicolasbeauvais/vue-social-sharing/compare/2.2.5...2.2.6) (2017-09-29) |
/*! | ||
* vue-social-sharing v2.2.6 | ||
* vue-social-sharing v2.2.7 | ||
* (c) 2017 nicolasbeauvais | ||
@@ -8,3 +8,3 @@ * Released under the MIT License. | ||
var email = {"sharer":"mailto:?subject=@title&body=@description","type":"direct"}; | ||
var email = {"sharer":"mailto:?subject=@title&body=@url%0D%0A%0D%0A@description","type":"direct"}; | ||
var facebook = {"sharer":"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote","type":"popup"}; | ||
@@ -19,7 +19,7 @@ var googleplus = {"sharer":"https://plus.google.com/share?url=@url","type":"popup"}; | ||
var telegram = {"sharer":"https://t.me/share/url?url=@url&text=@description","type":"popup"}; | ||
var twitter = {"sharer":"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser","type":"popup"}; | ||
var twitter = {"sharer":"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags&via=@twitteruser","type":"popup"}; | ||
var vk = {"sharer":"https://vk.com/share.php?url=@url&title=@title&description=@description&image=@media&noparse=true","type":"popup"}; | ||
var weibo = {"sharer":"http://service.weibo.com/share/share.php?url=@url&title=@title","type":"popup"}; | ||
var whatsapp = {"sharer":"whatsapp://send?text=@description%0D%0A@url","type":"direct","action":"share/whatsapp/share"}; | ||
var sms = {"sharer":"sms:?body=@description","type":"direct"}; | ||
var sms = {"sharer":"sms:?body=@url%20@description","type":"direct"}; | ||
var Networks = { | ||
@@ -317,3 +317,3 @@ email: email, | ||
SocialSharing.version = '2.2.6'; | ||
SocialSharing.version = '2.2.7'; | ||
@@ -320,0 +320,0 @@ SocialSharing.install = function (Vue) { |
/*! | ||
* vue-social-sharing v2.2.6 | ||
* vue-social-sharing v2.2.7 | ||
* (c) 2017 nicolasbeauvais | ||
@@ -12,3 +12,3 @@ * Released under the MIT License. | ||
var email = {"sharer":"mailto:?subject=@title&body=@description","type":"direct"}; | ||
var email = {"sharer":"mailto:?subject=@title&body=@url%0D%0A%0D%0A@description","type":"direct"}; | ||
var facebook = {"sharer":"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote","type":"popup"}; | ||
@@ -23,7 +23,7 @@ var googleplus = {"sharer":"https://plus.google.com/share?url=@url","type":"popup"}; | ||
var telegram = {"sharer":"https://t.me/share/url?url=@url&text=@description","type":"popup"}; | ||
var twitter = {"sharer":"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser","type":"popup"}; | ||
var twitter = {"sharer":"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags&via=@twitteruser","type":"popup"}; | ||
var vk = {"sharer":"https://vk.com/share.php?url=@url&title=@title&description=@description&image=@media&noparse=true","type":"popup"}; | ||
var weibo = {"sharer":"http://service.weibo.com/share/share.php?url=@url&title=@title","type":"popup"}; | ||
var whatsapp = {"sharer":"whatsapp://send?text=@description%0D%0A@url","type":"direct","action":"share/whatsapp/share"}; | ||
var sms = {"sharer":"sms:?body=@description","type":"direct"}; | ||
var sms = {"sharer":"sms:?body=@url%20@description","type":"direct"}; | ||
var Networks = { | ||
@@ -321,3 +321,3 @@ email: email, | ||
SocialSharing.version = '2.2.6'; | ||
SocialSharing.version = '2.2.7'; | ||
@@ -324,0 +324,0 @@ SocialSharing.install = function (Vue) { |
/*! | ||
* vue-social-sharing v2.2.6 | ||
* vue-social-sharing v2.2.7 | ||
* (c) 2017 nicolasbeauvais | ||
* Released under the MIT License. | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueSocialSharing=e()}(this,function(){"use strict";var t={sharer:"mailto:?subject=@title&body=@description",type:"direct"},e={sharer:"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote",type:"popup"},i={sharer:"https://plus.google.com/share?url=@url",type:"popup"},r={sharer:"http://line.me/R/msg/text/?@description%0D%0A@url",type:"popup"},p={sharer:"https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description",type:"popup"},o={sharer:"https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=@url&st.comments=@description",type:"popup"},s={sharer:"https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title",type:"popup"},n={sharer:"https://www.reddit.com/submit?url=@url&title=@title",type:"popup"},a={sharer:"https://web.skype.com/share?url=@description%0D%0A@url",type:"popup"},l={sharer:"https://t.me/share/url?url=@url&text=@description",type:"popup"},u={sharer:"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser",type:"popup"},h={sharer:"https://vk.com/share.php?url=@url&title=@title&description=@description&image=@media&noparse=true",type:"popup"},c={sharer:"http://service.weibo.com/share/share.php?url=@url&title=@title",type:"popup"},d={sharer:"whatsapp://send?text=@description%0D%0A@url",type:"direct",action:"share/whatsapp/share"},w={sharer:"sms:?body=@description",type:"direct"},m={email:t,facebook:e,googleplus:i,line:r,linkedin:p,odnoklassniki:o,pinterest:s,reddit:n,skype:a,telegram:l,twitter:u,vk:h,weibo:c,whatsapp:d,sms:w},g={functional:!0,props:{network:{type:String,default:""}},render:function(t,e){var i=m[e.props.network];return t(e.parent.networkTag,{class:e.data.staticClass||null,style:e.data.staticStyle||null,attrs:{id:e.data.attrs.id||null,"data-link":"popup"===i.type?"#share-"+e.props.network:e.parent.createSharingUrl(e.props.network),"data-action":"popup"===i.type?null:i.action},on:{click:"popup"===i.type?function(){e.parent.share(e.props.network)}:function(){e.parent.touch(e.props.network)}}},e.children)}},f="undefined"!=typeof window,y=f?window:null,k={props:{url:{type:String,default:f?window.location.href:""},title:{type:String,default:""},description:{type:String,default:""},quote:{type:String,default:""},hashtags:{type:String,default:""},twitterUser:{type:String,default:""},withCounts:{type:[String,Boolean],default:!1},googleKey:{type:String,default:void 0},media:{type:String,default:""},networkTag:{type:String,default:"span"}},data:function(){return{networks:m,popup:{status:!1,resizable:!0,toolbar:!1,menubar:!1,scrollbars:!1,location:!1,directories:!1,width:626,height:436,top:0,left:0,window:void 0,interval:null}}},methods:{createSharingUrl:function(t){return this.networks[t].sharer.replace(/@url/g,encodeURIComponent(this.url)).replace(/@title/g,encodeURIComponent(this.title)).replace(/@description/g,encodeURIComponent(this.description)).replace(/@quote/g,encodeURIComponent(this.quote)).replace(/@hashtags/g,this.hashtags).replace(/@media/g,this.media).replace(/@twitteruser/g,this.twitterUser?"&via="+this.twitterUser:"")},share:function(t){this.openSharer(t,this.createSharingUrl(t)),this.$root.$emit("social_shares_open",t,this.url)},touch:function(t){window.open(this.createSharingUrl(t),"_self"),this.$root.$emit("social_shares_open",t,this.url)},openSharer:function(t,e){var i=this;this.popup.window&&this.popup.interval&&(clearInterval(this.popup.interval),this.popup.window.close(),this.$root.$emit("social_shares_change",t,this.url)),this.popup.window=window.open(e,"sharer","status="+(this.popup.status?"yes":"no")+",height="+this.popup.height+",width="+this.popup.width+",resizable="+(this.popup.resizable?"yes":"no")+",left="+this.popup.left+",top="+this.popup.top+",screenX="+this.popup.left+",screenY="+this.popup.top+",toolbar="+(this.popup.toolbar?"yes":"no")+",menubar="+(this.popup.menubar?"yes":"no")+",scrollbars="+(this.popup.scrollbars?"yes":"no")+",location="+(this.popup.location?"yes":"no")+",directories="+(this.popup.directories?"yes":"no")),this.popup.window.focus(),this.popup.interval=setInterval(function(){i.popup.window.closed&&(clearInterval(i.popup.interval),i.popup.window=void 0,i.$root.$emit("social_shares_close",t,i.url))},500)}},mounted:function(){if(f){var t=void 0!==y.screenLeft?y.screenLeft:screen.left,e=void 0!==y.screenTop?y.screenTop:screen.top,i=y.innerWidth?y.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,r=y.innerHeight?y.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height;this.popup.left=i/2-this.popup.width/2+t,this.popup.top=r/2-this.popup.height/2+e}},components:{network:g}};return k.version="2.2.6",k.install=function(t){t.component("social-sharing",k)},"undefined"!=typeof window&&(window.SocialSharing=k),k}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueSocialSharing=e()}(this,function(){"use strict";var t={sharer:"mailto:?subject=@title&body=@url%0D%0A%0D%0A@description",type:"direct"},e={sharer:"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote",type:"popup"},i={sharer:"https://plus.google.com/share?url=@url",type:"popup"},r={sharer:"http://line.me/R/msg/text/?@description%0D%0A@url",type:"popup"},p={sharer:"https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description",type:"popup"},o={sharer:"https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=@url&st.comments=@description",type:"popup"},s={sharer:"https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title",type:"popup"},n={sharer:"https://www.reddit.com/submit?url=@url&title=@title",type:"popup"},a={sharer:"https://web.skype.com/share?url=@description%0D%0A@url",type:"popup"},l={sharer:"https://t.me/share/url?url=@url&text=@description",type:"popup"},u={sharer:"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags&via=@twitteruser",type:"popup"},h={sharer:"https://vk.com/share.php?url=@url&title=@title&description=@description&image=@media&noparse=true",type:"popup"},c={sharer:"http://service.weibo.com/share/share.php?url=@url&title=@title",type:"popup"},d={sharer:"whatsapp://send?text=@description%0D%0A@url",type:"direct",action:"share/whatsapp/share"},w={sharer:"sms:?body=@url%20@description",type:"direct"},m={email:t,facebook:e,googleplus:i,line:r,linkedin:p,odnoklassniki:o,pinterest:s,reddit:n,skype:a,telegram:l,twitter:u,vk:h,weibo:c,whatsapp:d,sms:w},g={functional:!0,props:{network:{type:String,default:""}},render:function(t,e){var i=m[e.props.network];return t(e.parent.networkTag,{class:e.data.staticClass||null,style:e.data.staticStyle||null,attrs:{id:e.data.attrs.id||null,"data-link":"popup"===i.type?"#share-"+e.props.network:e.parent.createSharingUrl(e.props.network),"data-action":"popup"===i.type?null:i.action},on:{click:"popup"===i.type?function(){e.parent.share(e.props.network)}:function(){e.parent.touch(e.props.network)}}},e.children)}},f="undefined"!=typeof window,y=f?window:null,k={props:{url:{type:String,default:f?window.location.href:""},title:{type:String,default:""},description:{type:String,default:""},quote:{type:String,default:""},hashtags:{type:String,default:""},twitterUser:{type:String,default:""},withCounts:{type:[String,Boolean],default:!1},googleKey:{type:String,default:void 0},media:{type:String,default:""},networkTag:{type:String,default:"span"}},data:function(){return{networks:m,popup:{status:!1,resizable:!0,toolbar:!1,menubar:!1,scrollbars:!1,location:!1,directories:!1,width:626,height:436,top:0,left:0,window:void 0,interval:null}}},methods:{createSharingUrl:function(t){return this.networks[t].sharer.replace(/@url/g,encodeURIComponent(this.url)).replace(/@title/g,encodeURIComponent(this.title)).replace(/@description/g,encodeURIComponent(this.description)).replace(/@quote/g,encodeURIComponent(this.quote)).replace(/@hashtags/g,this.hashtags).replace(/@media/g,this.media).replace(/@twitteruser/g,this.twitterUser?"&via="+this.twitterUser:"")},share:function(t){this.openSharer(t,this.createSharingUrl(t)),this.$root.$emit("social_shares_open",t,this.url)},touch:function(t){window.open(this.createSharingUrl(t),"_self"),this.$root.$emit("social_shares_open",t,this.url)},openSharer:function(t,e){var i=this;this.popup.window&&this.popup.interval&&(clearInterval(this.popup.interval),this.popup.window.close(),this.$root.$emit("social_shares_change",t,this.url)),this.popup.window=window.open(e,"sharer","status="+(this.popup.status?"yes":"no")+",height="+this.popup.height+",width="+this.popup.width+",resizable="+(this.popup.resizable?"yes":"no")+",left="+this.popup.left+",top="+this.popup.top+",screenX="+this.popup.left+",screenY="+this.popup.top+",toolbar="+(this.popup.toolbar?"yes":"no")+",menubar="+(this.popup.menubar?"yes":"no")+",scrollbars="+(this.popup.scrollbars?"yes":"no")+",location="+(this.popup.location?"yes":"no")+",directories="+(this.popup.directories?"yes":"no")),this.popup.window.focus(),this.popup.interval=setInterval(function(){i.popup.window.closed&&(clearInterval(i.popup.interval),i.popup.window=void 0,i.$root.$emit("social_shares_close",t,i.url))},500)}},mounted:function(){if(f){var t=void 0!==y.screenLeft?y.screenLeft:screen.left,e=void 0!==y.screenTop?y.screenTop:screen.top,i=y.innerWidth?y.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,r=y.innerHeight?y.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height;this.popup.left=i/2-this.popup.width/2+t,this.popup.top=r/2-this.popup.height/2+e}},components:{network:g}};return k.version="2.2.7",k.install=function(t){t.component("social-sharing",k)},"undefined"!=typeof window&&(window.SocialSharing=k),k}); |
{ | ||
"name": "vue-social-sharing", | ||
"description": "A Vue.js component for sharing links to social networks", | ||
"version": "2.2.6", | ||
"version": "2.2.7", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "nicolasbeauvais", |
import SocialSharing from './social-sharing'; | ||
SocialSharing.version = '2.2.6'; | ||
SocialSharing.version = '2.2.7'; | ||
@@ -5,0 +5,0 @@ SocialSharing.install = (Vue) => { |
{ | ||
"email": { | ||
"sharer": "mailto:?subject=@title&body=@description", | ||
"sharer": "mailto:?subject=@title&body=@url%0D%0A%0D%0A@description", | ||
"type": "direct" | ||
@@ -53,3 +53,3 @@ }, | ||
"twitter": { | ||
"sharer": "https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser", | ||
"sharer": "https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags&via=@twitteruser", | ||
"type": "popup" | ||
@@ -75,5 +75,5 @@ }, | ||
"sms": { | ||
"sharer": "sms:?body=@description", | ||
"sharer": "sms:?body=@url%20@description", | ||
"type": "direct" | ||
} | ||
} |
48722