This snippet helps automatically rewrite api.whatsapp.com
links into web.whatsapp.com
format, to avoid system-level triggers like xdg-open
and ensure links open directly in WhatsApp Web (e.g., on desktop Linux systems).

URL auto redirector by David Zhang.
Ensure that regex matching is on.
^https://api\.whatsapp\.com/send/\?phone=([0-9]+).*
https://web.whatsapp.com/send?phone=$1