Skip to content
Snippets Groups Projects
Commit b129c1e1 authored by chrisgarrity's avatar chrisgarrity
Browse files

Check for minimum versions of recommended browsers

parent 67b9d97c
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ const BrowserModal = ({intl, ...props}) => (
<p>
{ /* eslint-disable max-len */ }
<FormattedMessage
defaultMessage="We are very sorry, but Scratch does not support this browser. We recommend trying a supported browser such as Google Chrome, Mozilla Firefox, Microsoft Edge, or Apple Safari."
defaultMessage="We are very sorry, but Scratch does not support this browser version. We recommend updating to the latest version of a supported browser such as Google Chrome, Mozilla Firefox, Microsoft Edge, or Apple Safari."
description="Unsupported browser description"
id="gui.unsupportedBrowser.description"
/>
......
......@@ -10,6 +10,14 @@ export default function () {
bowser.silk) {
return false;
}
// @todo Should also test for versions of supported browsers
return true;
// IMPORTANT: If you change versions here, also change them in www
// minimum versions for recommended browsers
const minVersions = {
chrome: '63',
msedge: '15',
firefox: '57',
safari: '11'
};
// strict mode == false so any browser not mentioned in the min Versions is ok
return bowser.check(minVersions, false);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment