I can't understand this code. If this is a RegExp, can it be done in a simpler way? Or is this already widely compatible? (with IE6 and newer browsers)
var u = navigator.userAgent;
// Webkit - Safari
if(/webkit/i.test(u)){
// Gecko - Firefox, Opera
}else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
}
Is this just:
String.indexOf("webkit")