mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
Check for recommended browser version
Also removed Vivaldi from the rejected list to match gui
This commit is contained in:
parent
384d6148e0
commit
84606bf753
2 changed files with 11 additions and 3 deletions
|
@ -103,7 +103,7 @@
|
|||
"general.teacherAccounts": "Teacher Accounts",
|
||||
|
||||
"general.unsupportedBrowser": "This browser is not supported",
|
||||
"general.unsupportedBrowserDescription": "We're very sorry, but Scratch 3.0 does not support Internet Explorer, Vivaldi, Opera or Silk. We recommend trying a newer browser such as Google Chrome, Mozilla Firefox, or Microsoft Edge.",
|
||||
"general.unsupportedBrowserDescription": "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.",
|
||||
"general.3faq": "To learn more, go to the {faqLink}.",
|
||||
|
||||
"footer.discuss": "Discussion Forums",
|
||||
|
|
|
@ -6,10 +6,18 @@ import bowser from 'bowser';
|
|||
*/
|
||||
export default function () {
|
||||
if (bowser.msie ||
|
||||
bowser.vivaldi ||
|
||||
bowser.opera ||
|
||||
bowser.silk) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
// IMPORTANT: If you change versions here, also change them in gui
|
||||
// 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.isUnsupportedBrowser(minVersions, false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue