},
getShareLinks: function (hideLabels, url, context) {
- var shareLinks = {},
- shareHTML = '';
+ var shareLinks = {}, shareHTML = '';
if (url === undefined || url === null || url === 'undefined') {
url = '';
if (callback != undefined) {
callback();
}
- },
- intentShare: function (subject, body) {
+ }, intentShare: function (subject, body) {
if (subject == undefined) {
subject = this.fluidbook.settings.title;
}
extras[window.plugins.webintent.EXTRA_SUBJECT] = subject;
extras[window.plugins.webintent.EXTRA_TEXT] = body;
window.plugins.webintent.startActivity({
- action: window.plugins.webintent.ACTION_SEND,
- type: 'text/plain',
- extras: extras
+ action: window.plugins.webintent.ACTION_SEND, type: 'text/plain', extras: extras
}, function (args) {
}, function (args) {
});
} else {
window.location = 'mailto:?subject=' + encodeURIComponent(subject) + '&body=' + encodeURIComponent(body);
}
- this.fluidbook.stats.track(5);
+ this.fluidbook.stats.track(5, null, 'email');
},
getTweetContent: function (url, context) {
mailtoParams.push('body=' + body);
}
window.location = 'mailto:?' + mailtoParams.join('&');
- this.fluidbook.stats.track(5);
+ this.fluidbook.stats.track(5, null, 'email');
},
_getShortShare: function (url, context) {
var data = this._getShortShare(url, context);
this.fluidbook.wopen('https://twitter.com/intent/tweet?source=webclient' + data.url + '&text=' + encodeURIComponent(data.content), 'share_twitter', 'width=650,height=400');
- this.fluidbook.stats.track(13);
- },
- sendWhatsapp: function (url, context) {
+ this.fluidbook.stats.track(13, null, 'twitter');
+ }, sendWhatsapp: function (url, context) {
var data = this._getShortShare(url, context);
this.fluidbook.wopen('https://api.whatsapp.com/send?text=' + encodeURIComponent(data.content), 'share_whatsapp', 'width=600,height=600');
- this.fluidbook.stats.track(12);
- },
- sendFacebook: function (url, context) {
+ this.fluidbook.stats.track(12, null, 'whatsapp');
+ }, sendFacebook: function (url, context) {
this.fluidbook.wopen('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(this.getShareURL(url)), 'share_facebook', 'width=650,height=400');
- this.fluidbook.stats.track(12);
- },
- sendLinkedin: function (url, context) {
+ this.fluidbook.stats.track(12, null, 'facebook');
+ }, sendLinkedin: function (url, context) {
this.fluidbook.wopen('https://www.linkedin.com/sharing/share-offsite/?url=' + encodeURIComponent(this.getShareURL(url)), 'share_linkedin', 'width=650,height=400');
- this.fluidbook.stats.track(12);
- },
- sendPinterest: function (url, context) {
+ this.fluidbook.stats.track(12, null, 'linkedin');
+ }, sendPinterest: function (url, context) {
this.fluidbook.wopen('http://pinterest.com/pin/create/button/?url=' + encodeURIComponent(this.getShareURL(url)) + '&media=' + encodeURIComponent('https://workshop.fluidbook.com/services/facebook_thumbnail?id=' + this.fluidbook.settings.id + '&j=' + Date.now()) + '"', 'width=650,height=400');
- this.fluidbook.stats.track(12);
+ this.fluidbook.stats.track(12, null, 'pinterest');
}
};