码迷,mamicode.com
首页 > 其他好文 > 详细

网址查看浏览器内核版本

时间:2017-12-02 19:21:55      阅读:753      评论:0      收藏:0      [点我收藏+]

标签:[]   string   tar   this   google   get   ring   java   app   

查看浏览器内核版本

/*! browsecore v0.1 | (c) 2017 osfipin*/
(function (w) {
	"use strict";
	var n = w.navigator,d = w.document;
	var r = [];
	r.isIE = ("number" == typeof d.documentMode)?d.documentMode:false;//Trident
	r.isWebkit = ("undefined" != typeof n.productSub && "20030107" == n.productSub);
	r.isGecko = ("object" == typeof w.netscape);	
	r.isChrome = ("object" == typeof w.chrome || (r.isWebkit && "string" == typeof n.vendor && /Google/.test(n.vendor)));	
	r.isUC = ("object" == typeof w.ucapi);
	r.isFirefox = ("object" == typeof w.InstallTrigger);
	r.isEdge = (!r.isIE && !!w.StyleMedia);
	r.isOpera = (!!w.opr && !!opr.addons) || !!w.opera || n.userAgent.indexOf(‘ OPR/‘) >= 0;
	r.isSafari = Object.prototype.toString.call(w.HTMLElement).indexOf(‘Constructor‘) > 0 || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!w[‘safari‘] || safari.pushNotification);
	if(!r.isSafari && !r.isChrome && "string" == typeof n.vendor && /Apple/.test(n.vendor)){
		r.isSafari = true;
	}
	r.isBlink = (r.isChrome || r.isOpera) && !!w.CSS;
	w.browsecore = r;
})("undefined"!=typeof window?window:this);

查看自己浏览器的版本网站:我的浏览器。支持手机端。

我的浏览器网址:http://mybrowse.osfipin.com/

 

网址查看浏览器内核版本

标签:[]   string   tar   this   google   get   ring   java   app   

原文地址:http://www.cnblogs.com/osfipin/p/7954711.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!