Giter VIP home page Giter VIP logo

browser-detection's People

Contributors

alobaidizt avatar franklang avatar schickling avatar sesolar-evand avatar sjors avatar skarolus avatar thore3 avatar

Stargazers

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

Watchers

 avatar  avatar

browser-detection's Issues

Error: browserParts is null

When the browser user agent is different from the mentioned in the list on line 38, in my case it's Konqueror 4.5

browserParts = /(ie|firefox|chrome|safari|opera)(?:.*version)?(?:[ \/])?([\w.]+)/.exec(userAgent); browserParts becomes null, and app fails with "Error: browserParts is null" error.

Detect Google or other robots

I think that actually, there is no documentation about how are detected indexation robots (confirmed by scanning via google Search console on one of my websites, and displaying results)
Can you add this functionality ?

Does not support IE13 && IE14

Your script is great.
Please add support IE13 and IE14 detection.
Your script determine IE13 and IE14 as Chrome 46.
IE13 UserAgent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
IE14 UserAgent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/14.14300

I change this part in browser-detection.js:

if ( !! userAgent.match(/trident\/7\./)) {
        browser = "ie";
        version = 11;
      } else if (browserParts && browserParts.length > 2) {
        browser = browserParts[1];
        version = browserParts[2];
      }

with this:

if ( !! userAgent.match(/trident\/7\./)) {
        browser = "ie";
        version = 11;
      } else if (!! userAgent.match(/edge\/13\./)) {      
        browser = "ie";
        version = 13;
      } else if(!! userAgent.match(/edge\/14\./)){
        browser = "ie";
        version = 14;
      } else if (browserParts && browserParts.length > 2) {
        browser = browserParts[1];
        version = browserParts[2];
      }

Thanks a lot!!!

bower,json doesn't have main property

since your bower.json doesn't have "main" property point to the js file, tools like bower-install or wiredep cannot inject that dependency into the index.html.

Also please update the bower with that fix :)

Does not report correct Safari Version

"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9"

{browser: "safari", version: 601, os: "osx"}

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.