Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.

Commit

Permalink
2.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
45kb committed Dec 16, 2016
1 parent 2b05543 commit f507247
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-socialshare",
"version": "2.3.3",
"version": "2.3.4",
"description": "A social media url and content share module for angularjs.",
"authors": [
"Filippo Oretti <[email protected]",
Expand Down
20 changes: 10 additions & 10 deletions dist/angular-socialshare.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* angular-socialshare
* 2.3.2
*
* 2.3.4
*
* A social media url and content share module for angularjs.
* http://720kb.github.io/angular-socialshare
*
*
* MIT license
* Wed Oct 26 2016
* Fri Dec 16 2016
*/
/*global angular*/
/*eslint no-loop-func:0, func-names:0*/
Expand Down Expand Up @@ -536,12 +536,12 @@

urlString += '&bcc=' + encodeURIComponent(attrs.socialshareBcc);
}
if ($window.self !== $window.top) {
if($window.self !== $window.top) {
$window.open(urlString, '_blank');
} else {
$window.open(urlString, '_self');
}

}
, facebookMessengerShare = function facebookMessengerShare($window, attrs, element) {

Expand Down Expand Up @@ -818,19 +818,19 @@
}
, manageWhatsappShare = function manageWhatsappShare($window, attrs, element) {

var href = 'whatsapp://send?text=' + encodeURIComponent(attrs.socialshareText + ' ') + encodeURIComponent(attrs.socialshareUrl || $window.location.href);
var href = 'whatsapp://send?text=' + encodeURIComponent(attrs.socialshareText) + encodeURIComponent(attrs.socialshareUrl || $window.location.href);

element.attr('href', href);
element.attr('target', '_top');

}
, manageSmsShare = function smsShare($window, attrs, element) {

if (attrs.socialshareText.indexOf('%') >= 0) {
if(attrs.socialshareText.indexOf('%') >= 0) {
$log.warn('sending sms text with "%" sign is not supported');
}

var body = encodeURIComponent(attrs.socialshareText.replace('%','')) + ' - ' + encodeURIComponent(attrs.socialshareUrl)
var body = encodeURIComponent(attrs.socialshareText.replace('%','')) + encodeURIComponent(attrs.socialshareUrl)
, toPhoneNumber = attrs.socialshareTo || ''
, urlString = 'sms:' + toPhoneNumber + '?&body=' + body;

Expand All @@ -839,7 +839,7 @@
}
, manageViberShare = function manageViberShare($window, attrs, element) {

var href = 'viber://forward?text=' + encodeURIComponent(attrs.socialshareText + ' ') + encodeURIComponent(attrs.socialshareUrl || $window.location.href);
var href = 'viber://forward?text=' + encodeURIComponent(attrs.socialshareText) + encodeURIComponent(attrs.socialshareUrl || $window.location.href);

element.attr('href', href);
element.attr('target', '_top');
Expand Down
Loading

0 comments on commit f507247

Please sign in to comment.