zoukankan      html  css  js  c++  java
  • 浏览器的分类

    浏览器的分类

    获取浏览器的类型

    const MobileMatches: ReadonlyArray<string> = [
      'Needle',
      'Android',
      'Symbian',
      'UCWEB',
      'iPhone',
      'iPad',
      'iPod',
      'BlackBerry',
      'Windows Phone',
    ]
    
    export default {
      isMobile() {
        let isMobile = false
        const ua = window.navigator.userAgent
        MobileMatches.forEach(name => {
          !isMobile && (isMobile = !!ua.match(new RegExp(`${name}`, 'i')))
        })
        return isMobile
      },
    
      isEBai() {
        const EBaiAppReg = /AliApp(EB//
        return EBaiAppReg.test(window.navigator.userAgent)
      },
    }
    const MobileMatches: ReadonlyArray<string> = [
      'Needle',
      'Android',
      'Symbian',
      'UCWEB',
      'iPhone',
      'iPad',
      'iPod',
      'BlackBerry',
      'Windows Phone',
    ]
    
    export default {
      isMobile() {
        let isMobile = false
        const ua = window.navigator.userAgent
        MobileMatches.forEach(name => {
          !isMobile && (isMobile = !!ua.match(new RegExp(`${name}`, 'i')))
        })
        return isMobile
      },
    
      isEBai() {
        const EBaiAppReg = /AliApp(EB//
        return EBaiAppReg.test(window.navigator.userAgent)
      },
    }
    漫思
  • 相关阅读:
    使用汇编语言编写注入代码
    代码注入
    DLL卸载
    DLL注入
    nginx图片防盗链
    apache字体文件跨域、路由去掉index.php
    windows下访问虚拟机中配置的虚拟主机
    deepin docker 安装
    Deepin 配置ssh
    下拉框多选
  • 原文地址:https://www.cnblogs.com/sexintercourse/p/5747464.html
Copyright © 2011-2022 走看看