Skip to content

Instantly share code, notes, and snippets.

@jonnykates
Created March 27, 2018 10:05
Show Gist options
  • Save jonnykates/52b6627600fee2129313a2b668e85f96 to your computer and use it in GitHub Desktop.
Save jonnykates/52b6627600fee2129313a2b668e85f96 to your computer and use it in GitHub Desktop.
// Add in a 'share on whatsapp' link
var currentUrl = encodeURIComponent(document.URL);
$('.shareList').append('<li class="whatsapp"><a href="whatsapp://send?text=' + currentUrl + '" class="whatsapp" target="_blank">WhatsApp</a></li>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment