Return to Snippet

Revision: 49796
at July 30, 2011 01:29 by nuwak


Initial Code
function getNameBrouser() {
 var ua = navigator.userAgent.toLowerCase();
 // Определим Internet Explorer
 if (ua.indexOf("msie") != -1 && ua.indexOf("opera") == -1 && ua.indexOf("webtv") == -1) {
   return "msie"
 }
 // Opera
 if (ua.indexOf("opera") != -1) {
   return "opera"
 }
  if (ua.indexOf("chrome") != -1) {
   return "chrome";
 }
 // Gecko = Mozilla + Firefox + Netscape
 if (ua.indexOf("gecko") != -1) {
   return "gecko";
 }
 // Safari, используется в MAC OS
 if (ua.indexOf("safari") != -1) {
   return "safari";
 }
 // Konqueror, используется в UNIX-системах
 if (ua.indexOf("konqueror") != -1) {
   return "konqueror";
 }
 return "unknown";
}

Initial URL

                                

Initial Description

                                

Initial Title
Get Name Brouser

Initial Tags

                                

Initial Language
JavaScript