|
6 | 6 | * http://720kb.github.io/angular-socialshare
|
7 | 7 | *
|
8 | 8 | * MIT license
|
9 |
| - * Tue Feb 07 2017 |
| 9 | + * Fri Feb 17 2017 |
10 | 10 | */
|
11 | 11 | /*global angular*/
|
12 | 12 | /*eslint no-loop-func:0, func-names:0*/
|
|
40 | 40 | 'hashtags':'',
|
41 | 41 | 'text': '',
|
42 | 42 | 'media': '',
|
| 43 | + 'mobile_iframe': '', |
43 | 44 | 'type': '',
|
44 | 45 | 'via': '',
|
45 | 46 | 'to': '',
|
|
457 | 458 | urlString += '&display=' + encodeURIComponent(attrs.socialshareDisplay);
|
458 | 459 | }
|
459 | 460 |
|
| 461 | + if (attrs.socialshareMobileiframe) { |
| 462 | + urlString += '&mobile_iframe=' + encodeURIComponent(attrs.socialshareMobileiframe); |
| 463 | + } |
| 464 | + |
460 | 465 | if (attrs.socialshareDescription) {
|
461 | 466 | urlString += '&description=' + encodeURIComponent(attrs.socialshareDescription);
|
462 | 467 | }
|
|
551 | 556 | } else {
|
552 | 557 | $window.open(urlString, '_self');
|
553 | 558 | }
|
554 |
| - |
| 559 | + |
555 | 560 | }
|
556 | 561 | , facebookMessengerShare = function facebookMessengerShare($window, attrs, element) {
|
557 | 562 |
|
|
842 | 847 |
|
843 | 848 | var body = encodeURIComponent(attrs.socialshareText.replace('%',''))
|
844 | 849 | , toPhoneNumber = attrs.socialshareTo || '';
|
845 |
| - |
| 850 | + |
846 | 851 | if (attrs.socialshareUrl) {
|
847 | 852 | body += encodeURIComponent(attrs.socialshareUrl);
|
848 | 853 | }
|
849 |
| - |
| 854 | + |
850 | 855 | var urlString = 'sms:' + toPhoneNumber + '?&body=' + body;
|
851 |
| - |
| 856 | + |
852 | 857 | element.attr('href', urlString);
|
853 | 858 | element.attr('target', '_blank');
|
854 | 859 | }
|
|
1064 | 1069 | }
|
1065 | 1070 |
|
1066 | 1071 | //if some attribute is not define provide a default one
|
| 1072 | + attrs.socialshareMobileiframe = attrs.socialshareMobileiframe || configurationElement.conf.mobile_iframe; |
1067 | 1073 | attrs.socialshareQuote = attrs.socialshareQuote || configurationElement.conf.quote;
|
1068 | 1074 | attrs.socialshareTitle = attrs.socialshareTitle || configurationElement.conf.title;
|
1069 | 1075 | attrs.socialshareUrl = attrs.socialshareUrl || configurationElement.conf.url || configurationElement.conf.href;
|
|
0 commit comments