javascript - How to detect the installed Chrome version? -
i'm developing chrome extension , i'm wondering there way can detect version of chrome user using?
get major version of chrome integer:
function getchromeversion () { var raw = navigator.useragent.match(/chrom(e|ium)\/([0-9]+)\./); return raw ? parseint(raw[2], 10) : false; }
i've updated original answer, not throw exception in other browsers, , not use deprecated features.
you can set minimum_chrome_version
in manifest not let users older versions install it.
Comments
Post a Comment