open whatsapp links with web.whatsapp.com
There is still no way to install a native Linux application for whatsapp, so I always use whatsapp’s webapp with my daily browser (chromium based brave-browser).
Everything works [mostly] fine, except when I need to click on a whatsapp link in a web site, that is supposed to open a conversation with a certain new cell phone number. Here’s an example on BOSE’s site when you click in the button "message us".
When I click on a button like that one, I get redirected to api.whatsapp.com and then I get a popup prompt on my browser asking:
Open xdg-open? https://api.whatsapp.com wants to open this application.
If I proceed, nothing happens.
I would expect to have a new whatsapp web tab opened to be able to message the new contact.
I have tried to use
xdg-mime but I can’t understand how to use it.
xdg-mime default google-chrome.desktop 'x-scheme-handler/whatsapp'
Just hit cancel on the XDG-open prompt.
You’ll get a new web.whatsapp.com tab, you can close the old one that now says: "web.whatsapp is open in other tab".
This is a workaround, as closing the old window might not be desirable (you lose drafts).