java script to detect the crome browser
//gets the type of browser
function detectBrowser() {
if((navigator.userAgent.indexOf("Opera") || navigator.userAgent.indexOf('OPR')) != -1 ) {
return 'Opera';
} else if(navigator.userAgent.indexOf("Chrome") != -1 ) {
return 'Chrome';
} else if(navigator.userAgent.indexOf("Safari") != -1) {
return 'Safari';
} else if(navigator.userAgent.indexOf("Firefox") != -1 ){
return 'Firefox';
} else if((navigator.userAgent.indexOf("MSIE") != -1 ) || (!!document.documentMode == true )) {
return 'IE';//crap
} else {
return 'Unknown';
}
}
Also in Java:
- java create file
- java random seed
- java script to detect the crome browser
- primitive data types in java
- counting the sequence of character in string java
- Character.getNumericValue['z']
- clear stringbuilder java
- how to check the end of a string java
- Unrecognized option: --version Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
- java file path linux
- java.sql.SQLException: Before start of result set
- while loops java
- cordova cannot find symbol import com.google.firebase.iid.FirebaseMessagingService;
- action on long press of edit edittext
- java scanner input int
- string a int java
- imagesbutton how to set background
- check if value exists in hashset java
- use regex in if statement java
- java io
- java foreach map
- initialize scanner java
- java quit application
- download spring