Skip to content

Instantly share code, notes, and snippets.

@dmurawsky
Created September 30, 2021 18:34
Show Gist options
  • Save dmurawsky/b95a33bc09efc6ad8a3774b48d80fc64 to your computer and use it in GitHub Desktop.
Save dmurawsky/b95a33bc09efc6ad8a3774b48d80fc64 to your computer and use it in GitHub Desktop.
Get Chrome/Chromium version and alert
const getChromeVersion = () => {
const raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)
return raw ? parseInt(raw[2], 10) : false
}
if (getChromeVersion() < 93) {
alert('We recommend you use a Chrome browser version 93 or greater otherwise you may experience degraded service.')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment