I'm wanting to make it to where if the device is mobile (iPhone, Android, Windows, Etc.) it goes to a a different link than if it was a desktop device viewing the page.
For example, if I wanted to use an URL scheme to open instagram on a mobile device but the instagram website for a desktop device.
All help is appreciated!
Run Ilan's code like this
<a href="javascript:testBrowser()>Link</a>
where testBrowser()
is a function containing his code.