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

Commit

Permalink
new facebook mobile_iframe option
Browse files Browse the repository at this point in the history
  • Loading branch information
45kb committed Feb 18, 2017
1 parent 6a5f13a commit 6cf2070
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 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.6",
"version": "2.3.7",
"description": "A social media url and content share module for angularjs.",
"authors": [
"Filippo Oretti <[email protected]",
Expand Down
13 changes: 7 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.6
* 2.3.7
*
* A social media url and content share module for angularjs.
* http://720kb.github.io/angular-socialshare
*
* MIT license
* Fri Feb 17 2017
* Sat Feb 18 2017
*/
/*global angular*/
/*eslint no-loop-func:0, func-names:0*/
Expand Down Expand Up @@ -551,7 +551,7 @@

urlString += '&bcc=' + encodeURIComponent(attrs.socialshareBcc);
}
if($window.self !== $window.top) {
if ($window.self !== $window.top) {
$window.open(urlString, '_blank');
} else {
$window.open(urlString, '_self');
Expand Down Expand Up @@ -841,18 +841,19 @@
}
, manageSmsShare = function smsShare($window, attrs, element) {

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

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

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

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

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

0 comments on commit 6cf2070

Please sign in to comment.