Skip to content

Instantly share code, notes, and snippets.

@baslie
Last active May 11, 2022 08:59
Show Gist options
  • Save baslie/6091c3e5bc1439e3b3c3e33b8bfafee2 to your computer and use it in GitHub Desktop.
Save baslie/6091c3e5bc1439e3b3c3e33b8bfafee2 to your computer and use it in GitHub Desktop.
1. Save the code in bookmarks, we call for example "πŸ“± β†’ WhatsApp". 2. Highlight the phone number on the page. 3. Press "Phone to WhatsApp" button.
javascript: (function() {var val = window.getSelection().toString();var phone = val.replace(/[^+\d]+/g, '');var link = "https://web.whatsapp.com/send?phone=" + escape(phone) + "&text&source&data&app_absent";window.open(link, '_blank');})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment