I have an anchor to a telephone number. On phones is great. On desktops with Skype or Google Voice it's good. The problem is on desktops that just don't know how to deal with that.
What should I do? Detect if it's not mobile and change the link? I still want the link to show, just the URL to be different.
Is there a better way? If not, how do I detect mobile in JavaScript in order to change the href attribute?
Thank you.
To detect if the browser is launching from a mobile in JavaScript: http://detectmobilebrowser.com/
Then you can detect a phone number in JavaScript using a regular expression, such as one of those: http://www.regxlib.com/DisplayPatterns.aspx?cattabindex=6&categoryId=7
And finally rewrite the link: aLink.href="..."
The web-browser is responsible for launching the associated application for a certain link and I guess skype is registering for the phone numbers in the desktop. You can't do anything from the web-page I'm afraid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With