Giter VIP home page Giter VIP logo

browser's Introduction

Hi there 👋

I'm a front-end developer

My Website: passer-by.com

My Projects
名称 仓库/repository 演示/Demo
亲戚计算器 仓库 演示
行政区划数据 仓库 演示
jQuery插件库 仓库 演示
吃豆人游戏 仓库 演示
浏览器检测 仓库 演示
时间格式化 仓库 演示
万年历 仓库 演示
代码着色美化 仓库 演示
二维码组件 仓库 演示
身份证号码解析 仓库 演示
大数浮点数计算 仓库 演示
imageCode脚本加密 仓库 演示
hiddenCode脚本加密 仓库 演示

browser's People

Contributors

callmelare avatar cjh0613 avatar eunknight avatar ihuanran avatar mumuy avatar nnmax avatar onlyling avatar thecgdf avatar vndroid avatar zoze0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

browser's Issues

360 极速浏览器 Mac 版 12.2 无法正确检测

您好,详细信息如下:

浏览器下载地址:
https://down.360safe.com/cse/360Browser_for_mac_12.2.1636.0.dmg
系统版本:macOS Big Sur 11.1

检测结果:
Mozilla/5.0 (Macintosh; Intel Mac OS X -1_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36

浏览器 版本 内核 操作系统 设备 语言
Chrome 78.0.3904.108 Blink Mac OS Mozilla/5.0 (Macintosh; Intel Mac OS X -1.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 PC zh_CN
项目地址 Useragent分析 返回首页

360

IP 138 UserAgent分析和查询
服务端获取的UserAgent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
客户端获取的UserAgent:
Mozilla/5.0 (Macintosh; Intel Mac OS X -1_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
浏览器信息:
名称 版本号 渲染引擎 操作系统

Chrome 78.0.3904.108 WebKit 537.36 Mac OS undefined

3602

最新版的Opera被识别为Baidu

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 OPR/56.0.3051.43 (Edition Baidu)

Opera的UA里出现了Baidu导致被识别为Baidu,把js里hash对象中Opera放到Baidu后面应该就能解决了。

nodejs直接报错

require('./Browser')引入js,直接报错
ReferenceError: navigator is not defined
错误地方是if(navigator.userAgentData)这里,不是很熟悉nodejs,也不知道如何排查,还望楼主能解答一下,不胜感激

增加 Windows 11 检查

navigator.userAgentData.getHighEntropyValues(["platformVersion"])
 .then(ua => {
   if (navigator.userAgentData.platform === "Windows") {
     const majorPlatformVersion = parseInt(ua.platformVersion.split('.')[0]);
     if (majorPlatformVersion >= 13) {
       console.log("Windows 11 or later");
      }
      else if (majorPlatformVersion > 0) {
        console.log("Windows 10");
      }
      else {
        console.log("Before Windows 10");
      }
   }
   else {
     console.log("Not running on Windows");
   }
 });

等有时间,我想提交一个 PR 给仓库不知道是否可以

doesnt support nodejs?

Below is your comments on the top of the code

/**
 * 浏览器解析,浏览器、Node.js皆可
 * https://github.com/mumuy/browser
 */

I use this script on NodeJs,but var _window = window||{}; throw error,window is not defined.

webpack 打包 报错

用webpack打包的话 就报错Uncaught ReferenceError: Browser is not - defined。这个怎么去解决

识别ipad safari浏览器错误

ios 新版 ipad pro 更改了浏览器ua,因此判断方法变更为

isiPad = (navigator.userAgent.match(/(iPad)/) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1))

双核浏览器有bug - For some of the dual kernel browser, there are bugs

Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; InfoPath.3; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; SE 2.X MetaSr 1.0; rv:11.0) like Gecko

例如上方这个是搜狗的兼容模式,IE 11 兼容模式,但返回的是搜狗。其实返回的是最后一个 rv:11.0
For example, this is the Sogou compatibility mode, IE 11 compatible mode, but the return is Sogou. In fact, the return is the last rv: 11.0

Firefox for Mac 版本判断错误

火狐浏览器正式版会被判断为 Firefox Nightly

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:99.0) Gecko/20100101 Firefox/99.0

并且系统版本也判断错误 Mac OS 10

ie8报错

如题。
另外ie8兼容模式被判断为ie7了

readme中typo

DingTakl - 钉钉手机客户端

应该为DingTalk
以及,是否可以考虑支持检测欧朋浏览器(北界无限(北京)软件有限公司)?

部分浏览器被错误识别为 360 浏览器

被误判的设备

  • Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.108 Safari/537.36 2345Explorer/8.8.2.16672
  • Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.90 Safari/537.36 2345Explorer/9.1.0.16794
  • Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11 QIHU THEWORLD
  • Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.92 Safari/537.1 LBBROWSER
  • Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.84 Safari/537.22 BIDUPlayerBrowser/2.6.2.67 BIDUTN/81031078
  • Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.48 Safari/537.36 QQBrowser/7.5.19314.400
  • Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 TheWorld 6
  • Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 UBrowser/3.1.1644.29 Safari/537.36
  • Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 GBrowser/1.2.6.0 Safari/537.17
  • Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.11 TaoBrowser/3.5 Safari/536.11

Mobile of Huawei

The ways to judge if it's Huawei browser is

'Huawei': u.indexOf('HuaweiBrowser') > -1||u.indexOf('HUAWEI') > -1

But i found that other browsers installed on huawei also contain HUAWEIIJKM.

Huawei's default browser's kernal is X5(QQBrowser), so i think regarding it as QQBrowser may be more reasonable.

liebao 猎豹识别不出来?

liebao 猎豹识别不出来
device: "PC"
language: "zh_CN"
engine: "Blink"
browser: "Chrome"
os: "Windows"
osVersion: "7"
version: "79.0.3945.79"

还是显示chrome.

华为浏览器

手机端华为浏览器可以正确失败,PC端的华为浏览器识别的结果是谷歌

使用手机百度浏览器无法获取信息

使用手机百度浏览器无法获取信息,
使用window.navigator.userAgent输出信息如下:
Mozilla/5.0 (Linux; Android 8.0.0; EDI-AL10 Build/HUAWEIEDISON-AL10; wv) AppleWebKit/537.36
(KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.11 baiduboxapp/11.11.0.12 (Baidu; P1 8.0.0)

Opera被识别为Baidu浏览器

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 OPR/56.0.3051.43 (Edition Baidu)

Opera的UA里出现了Baidu导致被识别为Baidu了。
调整hash对象的顺序应该能解决。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.