diff --git a/package.json b/package.json index 804ef9fbe6316908f13212638c27c8bfdc8a9aef..5b4f686c5d081cf4f4aa6c9ea58cd80c3f57776a 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "css-loader": "^0.28.7", "enzyme": "^3.1.0", "enzyme-adapter-react-16": "1.1.0", + "es6-object-assign": "1.1.0", "eslint": "^4.7.1", "eslint-config-scratch": "^5.0.0", "eslint-plugin-import": "^2.8.0", @@ -86,10 +87,10 @@ "redux-throttle": "0.1.1", "rimraf": "^2.6.1", "scratch-audio": "0.1.0-prerelease.1513803406", - "scratch-blocks": "0.1.0-prerelease.1515121920", + "scratch-blocks": "0.1.0-prerelease.1515601869", "scratch-l10n": "2.0.20180108132626", "scratch-paint": "0.1.0-prerelease.20180110204944", - "scratch-render": "0.1.0-prerelease.1513807417", + "scratch-render": "0.1.0-prerelease.1515614083", "scratch-storage": "0.3.0", "scratch-vm": "0.1.0-prerelease.1515163816-prerelease.1515163829", "selenium-webdriver": "3.5.0", diff --git a/src/containers/error-boundary.jsx b/src/containers/error-boundary.jsx index 2a84f4b9f38a37c7418847c975b16fec47fb4011..c3684b14afd165aa757d96b53d8badc24b113201 100644 --- a/src/containers/error-boundary.jsx +++ b/src/containers/error-boundary.jsx @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import platform from 'platform'; +import BrowserModalComponent from '../components/browser-modal/browser-modal.jsx'; import WebGlModalComponent from '../components/webgl-modal/webgl-modal.jsx'; import log from '../lib/log.js'; @@ -25,11 +26,11 @@ class ErrorBoundary extends React.Component { render () { if (this.state.hasError) { if (platform.name === 'IE') { - return <h1>Sorry Internet Explorer is not supported.</h1>; + return <BrowserModalComponent onBack={this.handleBack} />; } if (window.WebGLRenderingContext) { const canvas = document.createElement('canvas'); - if (!canvas.getContext('webgl')) { + if (!canvas.getContext('webgl') && !canvas.getContext('experimental-webgl')) { return <WebGlModalComponent onBack={this.handleBack} />; } } else { diff --git a/src/index.jsx b/src/index.jsx index e6f35044060725497597a3de5e125d89fe18693d..e54fb895ee42c4486d51889679147c7c88980f56 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -1,3 +1,4 @@ +import 'es6-object-assign/auto'; import React from 'react'; import ReactDOM from 'react-dom'; import Modal from 'react-modal'; diff --git a/src/lib/audio/shared-audio-context.js b/src/lib/audio/shared-audio-context.js index 64749f93e79165a34225bf28f228f6d34e872825..f7a109ac70830a5e31719c03034eabd1e550a349 100644 --- a/src/lib/audio/shared-audio-context.js +++ b/src/lib/audio/shared-audio-context.js @@ -1,8 +1,12 @@ import StartAudioContext from 'startaudiocontext'; +import platform from 'platform'; -const AUDIO_CONTEXT = new (window.AudioContext || window.webkitAudioContext)(); +let AUDIO_CONTEXT; +if (platform.name !== 'IE') { + AUDIO_CONTEXT = new (window.AudioContext || window.webkitAudioContext)(); -StartAudioContext(AUDIO_CONTEXT); + StartAudioContext(AUDIO_CONTEXT); +} /** * Wrap browser AudioContext because we shouldn't create more than one diff --git a/src/lib/opcode-labels.js b/src/lib/opcode-labels.js index 45814fc4dab9f52a2be0d9ebdc1c1bfefa38c88f..b0055c3477dff79dbdd3f018bc3e788af735d1c6 100644 --- a/src/lib/opcode-labels.js +++ b/src/lib/opcode-labels.js @@ -56,13 +56,15 @@ const opcodeMap = { category: 'sensing', label: 'loudness' }, - sensing_of: { - category: 'sensing', - labelFn: params => `${params.PROPERTY} of ${params.OBJECT}` - }, sensing_current: { category: 'sensing', - labelFn: params => params.CURRENTMENU.toLowerCase() + labelFn: params => { + let currentMenu = params.CURRENTMENU.toLowerCase(); + if (currentMenu === 'dayofweek') { + currentMenu = 'day of week'; + } + return currentMenu; + } }, sensing_timer: { category: 'sensing',