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

Add more browsers to the unsupported list

Added:
- Opera (including Opera Mini)
- Silk

Not Added:
- Vivialdi - appears to be ‘Chrome’ in `platform.name`
parent 435d132f
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ import styles from './browser-modal.css';
const messages = defineMessages({
label: {
id: 'gui.unsupportedBrowser.label',
defaultMessage: 'Internet Explorer is not supported',
defaultMessage: 'Browser is not supported',
description: ''
}
});
......@@ -31,7 +31,7 @@ const BrowserModal = ({intl, ...props}) => (
<p>
{ /* eslint-disable max-len */ }
<FormattedMessage
defaultMessage="We're very sorry, but Scratch 3.0 does not support Internet Explorer. We recommend trying a newer browser such as Google Chrome, Mozilla Firefox, or Microsoft Edge."
defaultMessage="We're very sorry, but Scratch 3.0 does not support Internet Explorer, Opera or Silk. We recommend trying a newer browser such as Google Chrome, Mozilla Firefox, or Microsoft Edge."
description="Unsupported browser description"
id="gui.unsupportedBrowser.description"
/>
......
......@@ -35,7 +35,12 @@ class ErrorBoundary extends React.Component {
render () {
if (this.state.hasError) {
if (platform.name === 'IE') {
// don't use array.includes because that's something that causes IE to crash.
if (
platform.name === 'IE' ||
platform.name === 'Opera' ||
platform.name === 'Opera Mini' ||
platform.name === 'Silk') {
return <BrowserModalComponent onBack={this.handleBack} />;
}
return <CrashMessageComponent onReload={this.handleReload} />;
......
......@@ -36,10 +36,7 @@ class PreviewModal extends React.Component {
this.props.onViewProject();
}
supportedBrowser () {
if (platform.name === 'IE') {
return false;
}
return true;
return !['IE', 'Opera', 'Opera Mini', 'Silk', 'Vivaldi'].includes(platform.name);
}
render () {
return (this.supportedBrowser() ?
......
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