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

Commit f507247

Browse files
committed
2.3.4
1 parent 2b05543 commit f507247

5 files changed

+16
-16
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-socialshare",
3-
"version": "2.3.3",
3+
"version": "2.3.4",
44
"description": "A social media url and content share module for angularjs.",
55
"authors": [
66
"Filippo Oretti <[email protected]",

dist/angular-socialshare.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
* angular-socialshare
3-
* 2.3.2
4-
*
3+
* 2.3.4
4+
*
55
* A social media url and content share module for angularjs.
66
* http://720kb.github.io/angular-socialshare
7-
*
7+
*
88
* MIT license
9-
* Wed Oct 26 2016
9+
* Fri Dec 16 2016
1010
*/
1111
/*global angular*/
1212
/*eslint no-loop-func:0, func-names:0*/
@@ -536,12 +536,12 @@
536536

537537
urlString += '&bcc=' + encodeURIComponent(attrs.socialshareBcc);
538538
}
539-
if ($window.self !== $window.top) {
539+
if($window.self !== $window.top) {
540540
$window.open(urlString, '_blank');
541541
} else {
542542
$window.open(urlString, '_self');
543543
}
544-
544+
545545
}
546546
, facebookMessengerShare = function facebookMessengerShare($window, attrs, element) {
547547

@@ -818,19 +818,19 @@
818818
}
819819
, manageWhatsappShare = function manageWhatsappShare($window, attrs, element) {
820820

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

823823
element.attr('href', href);
824824
element.attr('target', '_top');
825825

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

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

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

@@ -839,7 +839,7 @@
839839
}
840840
, manageViberShare = function manageViberShare($window, attrs, element) {
841841

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

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

0 commit comments

Comments
 (0)