I'm using some JavaScript code to enable a PC user to send text to WhatsApp friends:
window.open("https://wa.me/?text=" + encodeURIComponent("Hello, world!"));
It does work, however, even if there's already a WhatsApp tab open - it opens a new one (forcing the user to reconnect to WhatsApp on a new tab).
Is there any option to use an already-open WhatsApp tab, if there is one?