|
1 | 1 | /*
|
2 | 2 | * angular-socialshare
|
3 |
| - * 2.3.6 |
| 3 | + * 2.3.7 |
4 | 4 | *
|
5 | 5 | * A social media url and content share module for angularjs.
|
6 | 6 | * http://720kb.github.io/angular-socialshare
|
7 | 7 | *
|
8 | 8 | * MIT license
|
9 |
| - * Fri Feb 17 2017 |
| 9 | + * Sat Feb 18 2017 |
10 | 10 | */
|
11 | 11 | /*global angular*/
|
12 | 12 | /*eslint no-loop-func:0, func-names:0*/
|
|
551 | 551 |
|
552 | 552 | urlString += '&bcc=' + encodeURIComponent(attrs.socialshareBcc);
|
553 | 553 | }
|
554 |
| - if($window.self !== $window.top) { |
| 554 | + if ($window.self !== $window.top) { |
555 | 555 | $window.open(urlString, '_blank');
|
556 | 556 | } else {
|
557 | 557 | $window.open(urlString, '_self');
|
|
841 | 841 | }
|
842 | 842 | , manageSmsShare = function smsShare($window, attrs, element) {
|
843 | 843 |
|
844 |
| - if(attrs.socialshareText.indexOf('%') >= 0) { |
| 844 | + if (attrs.socialshareText.indexOf('%') >= 0) { |
845 | 845 | $log.warn('sending sms text with "%" sign is not supported');
|
846 | 846 | }
|
847 | 847 |
|
848 | 848 | var body = encodeURIComponent(attrs.socialshareText.replace('%',''))
|
849 |
| - , toPhoneNumber = attrs.socialshareTo || ''; |
| 849 | + , toPhoneNumber = attrs.socialshareTo || '' |
| 850 | + , urlString; |
850 | 851 |
|
851 | 852 | if (attrs.socialshareUrl) {
|
852 | 853 | body += encodeURIComponent(attrs.socialshareUrl);
|
853 | 854 | }
|
854 | 855 |
|
855 |
| - var urlString = 'sms:' + toPhoneNumber + '?&body=' + body; |
| 856 | + urlString = 'sms:' + toPhoneNumber + '?&body=' + body; |
856 | 857 |
|
857 | 858 | element.attr('href', urlString);
|
858 | 859 | element.attr('target', '_blank');
|
|
0 commit comments