1 2/* 3 4DeviceDetection.js 5============================== 6 7Used to display content specific to mobile devices 8 9For andriod specific contnet add class="mobile-andriod" 10For iOS specific content add class="mobile-ios" 11For displaying conten when no supported deviced are detected use class="mobile-other" 12 13*/ 14 15 16//$(window).ready(function () { 17 18// DetectMobileDevice(); 19 20//}); 21 22 23function DetectMobileDevice() { 24 25 HideAll(); 26 27 if (navigator.userAgent.match(/Android/i)) { 28 29 //Show Marketplace Andriod links 30 ShowAndriodMarketPlace(); 31 32 } 33 else if (navigator.userAgent.match(/iphone|ipad|ipod/i)) { 34 35 //Show App Store Links 36 ShowAppleAppStore(); 37 38 } 39 //For Desktop Testing - using chrome or safari 40 else if (navigator.userAgent.match(/WebKit/i)) { 41 ShowAppleAppStore(); 42 } 43 else { 44 45 ShowOther(); 46 } 47} 48 49 50function HideAll() { 51 52 $(".mobile-ios").hide(); 53 $(".mobile-andriod").hide(); 54 $(".mobile-other").hide(); 55 56} 57 58function ShowAndriodMarketPlace() { 59 60 $(".mobile-andriod").show(); 61 62} 63 64function ShowAppleAppStore() { 65 66 $(".mobile-ios").show(); 67} 68 69 70function ShowOther() { 71 72 $(".mobile-other").show(); 73}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.