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

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
45kb committed Jan 27, 2017
1 parent 2043f94 commit 8a93faf
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 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.4",
"version": "2.3.5",
"description": "A social media url and content share module for angularjs.",
"authors": [
"Filippo Oretti <[email protected]",
Expand Down
17 changes: 11 additions & 6 deletions dist/angular-socialshare.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* angular-socialshare
* 2.3.4
* 2.3.5
*
* A social media url and content share module for angularjs.
* http://720kb.github.io/angular-socialshare
*
* MIT license
* Fri Dec 16 2016
* Fri Jan 27 2017
*/
/*global angular*/
/*eslint no-loop-func:0, func-names:0*/
Expand Down Expand Up @@ -830,10 +830,15 @@
$log.warn('sending sms text with "%" sign is not supported');
}

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

var body = encodeURIComponent(attrs.socialshareText.replace('%',''))
, toPhoneNumber = attrs.socialshareTo || '';

if (attrs.socialshareUrl) {
body += encodeURIComponent(attrs.socialshareUrl);
}

var urlString = 'sms:' + toPhoneNumber + '?&body=' + body;

element.attr('href', urlString);
element.attr('target', '_blank');
}
Expand Down
Loading

0 comments on commit 8a93faf

Please sign in to comment.