Return to Snippet

Revision: 50528
at August 26, 2011 01:06 by thiagotargino


Initial Code
function ismobilesafari() {
    if( navigator.userAgent.match( /(iPod|iPhone|iPad)/ ) ) {
        return true
    } else {
        return false
    }
}
if( ismobilesafari() ) {
    document.write( "It's Mobile Safari." )
} else {
    document.write( "Nope, it's another browser." )
}

Initial URL
http://alan.edward.es/posts/detecting-the-awesomeness-that-is-mobile-safari/

Initial Description


Initial Title
Dectectando Mobile Safari

Initial Tags
ios

Initial Language
JavaScript