Mobile Redirect for HTML5 - Disallow domain source

Hi Guys & Girls

Wonder if you can help me out please...
I have a javascript that I've placed in the header of my wordpress site to redirect a user to an HTML5 page depending on the browser/device they are coming in from, which works great.
How do I disallow traffic from a particular source from being redirected?
I have an APP that I am releasing also, but it uses data feeds from the wordpress site. The problem with the current redirect is I get a "double" menu effect, 1 for the APP menu, and one for the HTML5 site menu, which I don't want.

I've attached the detectmobilebrowser.js file

Alternatively, if you can help me out with a cleaner solution that'd be awesome!

Thanks in advance!
Shiv