File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 22
33module . exports = function ( shariff ) {
44 var url = encodeURIComponent ( shariff . getURL ( ) )
5- var title = encodeURIComponent ( shariff . getTitle ( ) )
6- var descr = encodeURIComponent ( shariff . getMeta ( 'description' ) )
75 return {
86 popup : true ,
97 shareText : {
@@ -63,6 +61,6 @@ module.exports = function(shariff) {
6361 'tr' : 'LinkedIn\'ta paylaş' ,
6462 'zh' : '在LinkedIn上分享'
6563 } ,
66- shareUrl : 'https://www.linkedin.com/shareArticle?mini=true&summary=' + descr + '&title=' + title + '& url=' + url
64+ shareUrl : 'https://www.linkedin.com/sharing/share-offsite/? url=' + url
6765 }
6866}
Original file line number Diff line number Diff line change @@ -23,12 +23,16 @@ module.exports = function(shariff) {
2323
2424 var title = shariff . getTitle ( )
2525
26- // 120 is the max character count left after twitters automatic url shortening with t.co
27- shareUrl . query . text = abbreviateText ( title , 120 )
2826 shareUrl . query . url = shariff . getURL ( )
2927 if ( shariff . options . twitterVia !== null ) {
3028 shareUrl . query . via = shariff . options . twitterVia
3129 }
30+ // From Twitters documentation (May 2021):
31+ // The length of your passed Tweet text should not exceed 280 characters
32+ // when combined with any passed hashtags, via, or url parameters.
33+ var remainingTextLength = ( 280 - ( shareUrl . query . via || '' ) . length - ( shareUrl . query . url || '' ) . length )
34+ shareUrl . query . text = abbreviateText ( title , remainingTextLength )
35+
3236 delete shareUrl . search
3337
3438 return {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ module.exports = function(shariff) {
66 var title = shariff . getTitle ( )
77
88 return {
9- popup : false ,
9+ popup : true ,
1010 shareText : {
1111 'bg' : 'cподеляне' ,
1212 'cs' : 'sdílet' ,
@@ -64,6 +64,6 @@ module.exports = function(shariff) {
6464 'tr' : 'Whatsapp\'ta paylaş' ,
6565 'zh' : '在Whatsapp上分享'
6666 } ,
67- shareUrl : 'whatsapp:/ /send?text=' + encodeURIComponent ( title ) + '%20' + url + shariff . getReferrerTrack ( )
67+ shareUrl : 'https://api.whatsapp.com /send?text=' + encodeURIComponent ( title ) + '%20' + url + shariff . getReferrerTrack ( )
6868 }
6969}
You can’t perform that action at this time.
0 commit comments