vue-social-sharing
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -0,1 +1,7 @@ | ||
<a name="2.1.3"></a> | ||
# [2.1.3](https://github.com/nicolasbeauvais/vue-social-sharing/compare/2.1.2...2.1.3) (2017-03-18) | ||
- Add Weibo and VK | ||
- Refactor unit tests using loops | ||
- Convert networks.js to json format (network.json) | ||
<a name="2.1.2"></a> | ||
@@ -2,0 +8,0 @@ # [2.1.2](https://github.com/nicolasbeauvais/vue-social-sharing/compare/2.1.1...2.1.2) (2017-03-18) |
/*! | ||
* vue-social-sharing v2.1.2 | ||
* vue-social-sharing v2.1.3 | ||
* (c) 2017 nicolasbeauvais | ||
@@ -8,38 +8,21 @@ * Released under the MIT License. | ||
var facebook = {"sharer":"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote","type":"popup"}; | ||
var googleplus = {"sharer":"https://plus.google.com/share?url=@url","type":"popup"}; | ||
var linkedin = {"sharer":"https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description","type":"popup"}; | ||
var pinterest = {"sharer":"https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title","type":"popup"}; | ||
var reddit = {"sharer":"https://www.reddit.com/submit?url=@url&title=@title","type":"popup"}; | ||
var twitter = {"sharer":"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@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=@url","type":"direct","action":"share/whatsapp/share"}; | ||
var Networks = { | ||
facebook: { | ||
sharer: 'https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote', | ||
type: 'popup' | ||
}, | ||
twitter: { | ||
sharer: 'https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser', | ||
type: 'popup' | ||
}, | ||
googleplus: { | ||
sharer: 'https://plus.google.com/share?url=@url', | ||
type: 'popup' | ||
}, | ||
pinterest: { | ||
sharer: 'https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title', | ||
type: 'popup' | ||
}, | ||
reddit: { | ||
sharer: 'http://www.reddit.com/submit?url=@url&title=@title', | ||
type: 'popup' | ||
}, | ||
linkedin: { | ||
sharer: 'https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description', | ||
type: 'popup' | ||
}, | ||
whatsapp: { | ||
sharer: 'whatsapp://send?text=@url', | ||
type: 'direct', | ||
action: 'share/whatsapp/share' | ||
} | ||
facebook: facebook, | ||
googleplus: googleplus, | ||
linkedin: linkedin, | ||
pinterest: pinterest, | ||
reddit: reddit, | ||
twitter: twitter, | ||
vk: vk, | ||
weibo: weibo, | ||
whatsapp: whatsapp | ||
}; | ||
@@ -293,3 +276,3 @@ | ||
SocialSharing.version = '2.1.2'; | ||
SocialSharing.version = '2.1.3'; | ||
@@ -296,0 +279,0 @@ SocialSharing.install = function (Vue) { |
/*! | ||
* vue-social-sharing v2.1.2 | ||
* vue-social-sharing v2.1.3 | ||
* (c) 2017 nicolasbeauvais | ||
@@ -7,43 +7,26 @@ * Released under the MIT License. | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global.VueSocialSharing = factory()); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global.VueSocialSharing = factory()); | ||
}(this, (function () { 'use strict'; | ||
var facebook = {"sharer":"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote","type":"popup"}; | ||
var googleplus = {"sharer":"https://plus.google.com/share?url=@url","type":"popup"}; | ||
var linkedin = {"sharer":"https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description","type":"popup"}; | ||
var pinterest = {"sharer":"https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title","type":"popup"}; | ||
var reddit = {"sharer":"https://www.reddit.com/submit?url=@url&title=@title","type":"popup"}; | ||
var twitter = {"sharer":"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@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=@url","type":"direct","action":"share/whatsapp/share"}; | ||
var Networks = { | ||
facebook: { | ||
sharer: 'https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote', | ||
type: 'popup' | ||
}, | ||
twitter: { | ||
sharer: 'https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser', | ||
type: 'popup' | ||
}, | ||
googleplus: { | ||
sharer: 'https://plus.google.com/share?url=@url', | ||
type: 'popup' | ||
}, | ||
pinterest: { | ||
sharer: 'https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title', | ||
type: 'popup' | ||
}, | ||
reddit: { | ||
sharer: 'http://www.reddit.com/submit?url=@url&title=@title', | ||
type: 'popup' | ||
}, | ||
linkedin: { | ||
sharer: 'https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description', | ||
type: 'popup' | ||
}, | ||
whatsapp: { | ||
sharer: 'whatsapp://send?text=@url', | ||
type: 'direct', | ||
action: 'share/whatsapp/share' | ||
} | ||
facebook: facebook, | ||
googleplus: googleplus, | ||
linkedin: linkedin, | ||
pinterest: pinterest, | ||
reddit: reddit, | ||
twitter: twitter, | ||
vk: vk, | ||
weibo: weibo, | ||
whatsapp: whatsapp | ||
}; | ||
@@ -297,3 +280,3 @@ | ||
SocialSharing.version = '2.1.2'; | ||
SocialSharing.version = '2.1.3'; | ||
@@ -300,0 +283,0 @@ SocialSharing.install = function (Vue) { |
/*! | ||
* vue-social-sharing v2.1.2 | ||
* vue-social-sharing v2.1.3 | ||
* (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={facebook:{sharer:"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote",type:"popup"},twitter:{sharer:"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser",type:"popup"},googleplus:{sharer:"https://plus.google.com/share?url=@url",type:"popup"},pinterest:{sharer:"https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title",type:"popup"},reddit:{sharer:"http://www.reddit.com/submit?url=@url&title=@title",type:"popup"},linkedin:{sharer:"https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description",type:"popup"},whatsapp:{sharer:"whatsapp://send?text=@url",type:"direct",action:"share/whatsapp/share"}},e={functional:!0,props:{network:{type:String,default:""}},render:function(e,o){var i=t[o.props.network];return e(o.parent.networkTag,{class:o.data.staticClass||null,style:o.data.staticStyle||null,attrs:{id:o.data.attrs.id||null,"data-link":"popup"===i.type?"#share-"+o.props.network:o.parent._getSharer(o.props.network),"data-action":"popup"===i.type?null:i.action},on:{click:"popup"===i.type?function(){o.parent.share(o.props.network)}:function(){o.parent.touch(o.props.network)}}},o.children)}},o="undefined"!=typeof window,i=o?window:null,p={props:{url:{type:String,default:o?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:t,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}}},methods:{_getSharer: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(this._getSharer(t)),this.$root.$emit("social_shares_click",t,this.url)},touch:function(t){window.open(this._getSharer(t),"_self"),this.$root.$emit("social_shares_click",t,this.url)},_openSharer:function(t){this.popup.window=window.open(t,"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"))}},mounted:function(){o&&(this.popup.left=i.screen.width/2-(this.popup.width/2+10),this.popup.top=i.screen.height/2-(this.popup.height/2+50))},components:{network:e}};return p.version="2.1.2",p.install=function(t){t.component("social-sharing",p)},"undefined"!=typeof window&&(window.SocialSharing=p),p}); | ||
!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:"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote",type:"popup"},e={sharer:"https://plus.google.com/share?url=@url",type:"popup"},p={sharer:"https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description",type:"popup"},r={sharer:"https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title",type:"popup"},i={sharer:"https://www.reddit.com/submit?url=@url&title=@title",type:"popup"},o={sharer:"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser",type:"popup"},s={sharer:"https://vk.com/share.php?url=@url&title=@title&description=@description&image=@media&noparse=true",type:"popup"},n={sharer:"http://service.weibo.com/share/share.php?url=@url&title=@title",type:"popup"},a={sharer:"whatsapp://send?text=@url",type:"direct",action:"share/whatsapp/share"},u={facebook:t,googleplus:e,linkedin:p,pinterest:r,reddit:i,twitter:o,vk:s,weibo:n,whatsapp:a},h={functional:!0,props:{network:{type:String,default:""}},render:function(t,e){var p=u[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"===p.type?"#share-"+e.props.network:e.parent._getSharer(e.props.network),"data-action":"popup"===p.type?null:p.action},on:{click:"popup"===p.type?function(){e.parent.share(e.props.network)}:function(){e.parent.touch(e.props.network)}}},e.children)}},l="undefined"!=typeof window,c=l?window:null,d={props:{url:{type:String,default:l?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:u,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}}},methods:{_getSharer: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(this._getSharer(t)),this.$root.$emit("social_shares_click",t,this.url)},touch:function(t){window.open(this._getSharer(t),"_self"),this.$root.$emit("social_shares_click",t,this.url)},_openSharer:function(t){this.popup.window=window.open(t,"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"))}},mounted:function(){l&&(this.popup.left=c.screen.width/2-(this.popup.width/2+10),this.popup.top=c.screen.height/2-(this.popup.height/2+50))},components:{network:h}};return d.version="2.1.3",d.install=function(t){t.component("social-sharing",d)},"undefined"!=typeof window&&(window.SocialSharing=d),d}); |
{ | ||
"name": "vue-social-sharing", | ||
"description": "A Vue.js component for sharing links to social networks", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"author": { | ||
@@ -99,3 +99,6 @@ "name": "nicolasbeauvais", | ||
"test:unit": "karma start config/karma.unit.conf.js" | ||
}, | ||
"dependencies": { | ||
"rollup-plugin-json": "^2.1.0" | ||
} | ||
} |
import SocialSharing from './social-sharing'; | ||
SocialSharing.version = '2.1.2'; | ||
SocialSharing.version = '2.1.3'; | ||
@@ -5,0 +5,0 @@ SocialSharing.install = (Vue) => { |
@@ -1,2 +0,2 @@ | ||
import Networks from './networks'; | ||
import Networks from './networks.json'; | ||
@@ -3,0 +3,0 @@ export default { |
import SocialSharingNetwork from './social-sharing-network'; | ||
import Networks from './networks'; | ||
import Networks from './networks.json'; | ||
@@ -4,0 +4,0 @@ const inBrowser = typeof window !== 'undefined'; |
37930
1
793
+ Addedrollup-plugin-json@^2.1.0
+ Added@types/estree@0.0.38(transitive)
+ Added@types/node@22.13.9(transitive)
+ Addedestree-walker@0.6.1(transitive)
+ Addedrollup@0.58.2(transitive)
+ Addedrollup-plugin-json@2.3.1(transitive)
+ Addedrollup-pluginutils@2.8.2(transitive)
+ Addedundici-types@6.20.0(transitive)