Permalink
Browse files

Merge pull request #2357 from dgw/share-tweaks

Share tweaks: https + 280 chars on Twitter
  • Loading branch information...
ozh committed Jan 15, 2018
2 parents dd78d7f + c1207f0 commit 143a2e82881894067830aa95a6fe3aae40af4002
Showing with 3 additions and 3 deletions.
  1. +3 −3 js/share.js
@@ -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 );

0 comments on commit 143a2e8

Please sign in to comment.