I need a javascript to detect if viewing a page from an Iphone 5 with ios 8 and chrome. I found this but it only detect if it is an iPhone but not the version or the browser.
if(/(iPhone)/i.test(navigator.userAgent)) {
if(/OS [8]_\d(_\d)? like Mac OS X/i.test(navigator.userAgent)) {
alert("SI");
}