当前位置:网站首页>获取设备信息相关
获取设备信息相关
2022-06-23 17:49:00 【神奇大叔】
QQ判断浏览器环境:
function getBrowser() {
if((!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0) {
return 'Opera'
}
if(typeof InstallTrigger !== 'undefined') {
return 'Firefox'
}
if(/constructor/i.test(window.HTMLElement) || (function (p) {
return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && window['safari'].pushNotification))) {
return 'Safari'
}
var isIE = /*@[email protected]*/false || !!document.documentMode;
if(isIE) {
return 'IE'
}
if(!isIE && !!window.StyleMedia) {
return 'Edge';
}
var isChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
if(isChrome) {
return 'Chrome';
}
if(isChrome && (navigator.userAgent.indexOf("Edg") != -1)) {
return 'EdgeChromium'
}
}
边栏推荐
猜你喜欢

Imeta | Nannong shenqirong team released microbial network analysis and visualization R package ggclusternet

可编程的,协议独立的软件交换机(论文阅读)

TT 语音落地 Zadig:开源共创 Helm 接入场景,环境治理搞得定!

QT实现基于规则的机器翻译系统 课程论文+任务书+项目源码

第十三届蓝桥杯单片机国赛真题

Rancher2.6全新Monitoring快速入门

Leetcode: hash table 06 (ransom letter)

产品设计- 需求分析

用软件可编程FPGA加速网络边缘的移动应用总结

NetCF总结
随机推荐
高级计网笔记(四)
Wechat applet reports an error [app.json file content error] app json: app. JSON not found
[QT] multiple choice questions
五星认证!知道创宇通过中国信通院内容审核服务系统评测
学习编程只需要这三条建议!
[QT] Chapter 3 and 4: window components and layout management
【Qt】第三、四章:窗口部件、布局管理
可编程的,协议独立的软件交换机(论文阅读)
test
凸优化笔记
测试
云安全日报220623:红帽数据库管理系统发现执行任意代码漏洞,需要尽快升级
Yapi installation
Deep understanding of padding
韬略生物冲刺科创板:年亏损过亿 实控人张大为夫妇为美国籍
Univariate quadratic equation to gauge field
Improving efficiency or increasing costs, how should developers understand pair programming?
各种解背包问题
Remote connection raspberry pie in VNC Viewer Mode
Why create a public OKR?