I know I can add the
minimum_chrome_version property to my manifest file to require at least this version of chrome
But what I am looking f
from fastClick
var chromeVersion=(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1];
You can extract get the current Chrome version from the user agent string:
var chromeVersion = /Chrome\/([0-9.]+)/.exec(navigator.userAgent)[1];
When using this to "detect" features, keep in mind the availability of some features vary between channels. In particular, many new features are already available on beta channels, but not on the stable channel, even though releases on both channels have the same version string. Instead of using the version to disable features, you can detect the presence of the APIs, e.g.:
if (chrome.declarativeWebRequest) {
// Use declarativeWebRequest API...
} else {
// fall back to webRequest API...
}