Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WhatsApp Api on Mobile and Desktop
* Replace mobile URL of WhatsApp with Desktop
* The mobile first strategy is used cause most people decide to not show WhatsApp on Desktop but only on mobile where it is very useful
* @dependencies [ core/w-ismobile.js ]
if(withOptions.whatsappWeb && ! && $(".whatsapp-weburl").length > 0){
clog('WhatsApp Enabled and Present');
var mobile_wa = $(".whatsapp-weburl").attr('href').replace('?text=', '&text');
mobile_wa = mobile_wa.replace('', '')
$(".whatsapp-weburl").attr('href', mobile_wa);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.