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

Commit 8a93faf

Browse files
committed
new version
1 parent 2043f94 commit 8a93faf

5 files changed

+19
-12
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.4",
3+
"version": "2.3.5",
44
"description": "A social media url and content share module for angularjs.",
55
"authors": [
66
"Filippo Oretti <[email protected]",

dist/angular-socialshare.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
* angular-socialshare
3-
* 2.3.4
3+
* 2.3.5
44
*
55
* A social media url and content share module for angularjs.
66
* http://720kb.github.io/angular-socialshare
77
*
88
* MIT license
9-
* Fri Dec 16 2016
9+
* Fri Jan 27 2017
1010
*/
1111
/*global angular*/
1212
/*eslint no-loop-func:0, func-names:0*/
@@ -830,10 +830,15 @@
830830
$log.warn('sending sms text with "%" sign is not supported');
831831
}
832832

833-
var body = encodeURIComponent(attrs.socialshareText.replace('%','')) + encodeURIComponent(attrs.socialshareUrl)
834-
, toPhoneNumber = attrs.socialshareTo || ''
835-
, urlString = 'sms:' + toPhoneNumber + '?&body=' + body;
836-
833+
var body = encodeURIComponent(attrs.socialshareText.replace('%',''))
834+
, toPhoneNumber = attrs.socialshareTo || '';
835+
836+
if (attrs.socialshareUrl) {
837+
body += encodeURIComponent(attrs.socialshareUrl);
838+
}
839+
840+
var urlString = 'sms:' + toPhoneNumber + '?&body=' + body;
841+
837842
element.attr('href', urlString);
838843
element.attr('target', '_blank');
839844
}

0 commit comments

Comments
 (0)