Created
September 30, 2021 18:34
-
-
Save dmurawsky/b95a33bc09efc6ad8a3774b48d80fc64 to your computer and use it in GitHub Desktop.
Get Chrome/Chromium version and alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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