Skip to content

Commit

Permalink
Merge pull request YOURLS#2357 from dgw/share-tweaks
Browse files Browse the repository at this point in the history
Share tweaks: https + 280 chars on Twitter
  • Loading branch information
ozh authored Jan 15, 2018
2 parents dd78d7f + c1207f0 commit 143a2e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ $(document).ready(function(){
function update_share() {
var text = encodeURIComponent( $('#tweet_body').val() );
var url = encodeURIComponent( $('#copylink').val() );
var tw = 'http://twitter.com/intent/tweet?status='+text;
var fb = 'http://www.facebook.com/share.php?u='+url ;
var tw = 'https://twitter.com/intent/tweet?status='+text;
var fb = 'https://www.facebook.com/share.php?u='+url ;
$('#share_tw').attr('href', tw);
$('#share_fb').attr('href', fb);

var charcount = parseInt(140 - $('#tweet_body').val().length);
var charcount = parseInt(280 - $('#tweet_body').val().length);
$('#charcount')
.toggleClass("negative", charcount < 0)
.text( charcount );
Expand Down

0 comments on commit 143a2e8

Please sign in to comment.