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
Branches
Tags
No related merge requests found
...@@ -32,7 +32,7 @@ const BrowserModal = ({intl, ...props}) => ( ...@@ -32,7 +32,7 @@ const BrowserModal = ({intl, ...props}) => (
<p> <p>
{ /* eslint-disable max-len */ } { /* eslint-disable max-len */ }
<FormattedMessage <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" description="Unsupported browser description"
id="gui.unsupportedBrowser.description" id="gui.unsupportedBrowser.description"
/> />
......
...@@ -10,6 +10,14 @@ export default function () { ...@@ -10,6 +10,14 @@ export default function () {
bowser.silk) { bowser.silk) {
return false; return false;
} }
// @todo Should also test for versions of supported browsers // IMPORTANT: If you change versions here, also change them in www
return true; // 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.
Please register or to comment