If the user-agent includes the word "myapp", then alert('hi');
BTW, I am using JQuery.
If the user-agent includes the word "myapp", then alert('hi');
BTW, I am using JQuery.
if (navigator.userAgent.indexOf("myapp") !== -1) {
alert("hi");
}
I recommend you don't do user-agent sniffing.