BLOG META

Javascript Detect any Browser and Browser Version

Since jQuery 1.9.0 removed the jQuery.browser functionality, I compiled some useful functions to replicate that functionality.
[raw]

function is_ie(){
    if (navigator.appVersion.indexOf("MSIE") != -1){
    	return true;
    };
    return false;
};
function is_firefox(){
    if (navigator.userAgent.indexOf("Firefox") != -1){
    	return true;
    };
    return false;
};
function is_opera(){
    if (navigator.userAgent.indexOf("Opera") != -1){
    	return true;
    };
    return false;
};
function is_chrome(){
      return navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
};
function is_safari(){
      return navigator.userAgent.toLowerCase().indexOf('safari') > -1;
};
function version_ie(){
      return parseFloat(navigator.appVersion.split("MSIE")[1]);
};
function version_firefox(){
if (/Firefox[/s](d+.d+)/.test(navigator.userAgent)){
var aversion=new Number(RegExp.$1);
return(aversion);
};
};
function version_opera(){
if (/Opera[/s](d+.d+)/.test(navigator.userAgent)){
var aversion=new Number(RegExp.$1);
return(aversion);
};
};
function is_ios() {
    return ((navigator.platform.indexOf("iPhone") != -1) || (navigator.platform.indexOf("iPod") != -1) || (navigator.platform.indexOf("iPad") != -1 || (navigator.platform.indexOf("Android") != -1))
        );
}
function is_android() {
    //return true;
    return (navigator.platform.indexOf("Android") != -1);
}

[/raw]

{"type":"main_options","images_arr":"'#ffffff'","enable_ajax":"off","soundcloud_apikey":"","bg_isparallax":"off","bg_slideshow_time":"0","bg_transition":"slidedown","site_url":"http:\/\/digitalzoomstudio.net","theme_url":"http:\/\/digitalzoomstudio.net\/wp-content\/themes\/qucreative\/","blur_ammount":"26","width_column":"50","width_section_bg":"","width_gap":"30","border_width":"0","border_color":"#ffffff","translate_cancel_comment":"Cancel reply","translate_leave_a_comment":"Leave a comment","translate_leave_a_comment_to":"Leave a comment to","is_customize_preview":"off","width_blur_margin":"30","gallery_w_thumbs_autoplay_videos":"off","enable_native_scrollbar":"on","content_enviroment_opacity":"30","menu_enviroment_opacity":"70"}
{"type":"darkfull"}