arasatasaygin / is.js

Micro check library
http://is.js.org
MIT License
9.16k stars 627 forks source link

Fail Google Chrome validation #287

Open ThomasSousa96 opened 6 years ago

ThomasSousa96 commented 6 years ago
ironmaniiith commented 6 years ago

@ThomasSousa96 , thanks for reporting. Could you please specify the versions as well?

FA65 commented 4 years ago

For information on the problem is.chrome() returns false for Google Chrome on Apple mobile devices because the regexp used in the function, it is testing navigator.vendor and it returns 'Apple Computer, Inc.' instead of the expected 'google inc'

line 628

    // is current browser chrome?
    // parameter is optional
    is.chrome = function(range) {
        var match = /google inc/.test(vendor) ? userAgent.match(/(?:chrome|crios)\/(\d+)/) : null;
        return match !== null && is.not.opera() && compareVersion(match[1], range);
    };
jdesherlia commented 4 years ago

Is this library still being actively maintained? I just started using it and would really benefit from this issue being fixed, but looking at the issues, it seems like there is very little activity from the developers in the past couple of years.