Skip to content

Commit

Permalink
Run grunt update, see phetsims/simula-rasa#17
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jun 14, 2019
1 parent 49c621c commit 01a68a8
Showing 1 changed file with 45 additions and 47 deletions.
92 changes: 45 additions & 47 deletions blast_en.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,59 +24,57 @@
</div>

<script type="text/javascript">
( function() {

// Identify the brand (assume generated brand if not provided with query parameters)
var brandMatch = location.search.match( /brand=([^&]+)/ );
var brand = brandMatch ? decodeURIComponent( brandMatch[ 1 ] ) : 'adapted-from-phet';
// Identify the brand (assume generated brand if not provided with query parameters)
const brandMatch = location.search.match( /brand=([^&]+)/ );
const brand = brandMatch ? decodeURIComponent( brandMatch[ 1 ] ) : 'adapted-from-phet';

// Preloads, with more included for phet-io brand
var preloads = [
'../joist/js/splash.js',
'../sherpa/lib/jquery-2.1.0.js',
'../sherpa/lib/lodash-4.17.4.js',
'../sherpa/lib/FileSaver-b8054a2.js',
'../sherpa/lib/himalaya-0.2.7.js',
'../sherpa/lib/he-1.1.1.js',
'../assert/js/assert.js',
'../query-string-machine/js/QueryStringMachine.js',
'../chipper/js/initialize-globals.js',
'../phet-core/js/copyWithSortedKeys.js',
'../sherpa/lib/seedrandom-2.4.2.js',
'../sherpa/lib/game-up-camera-1.0.0.js',
'../sherpa/lib/base64-js-1.2.0.js',
'../sherpa/lib/TextEncoderLite-3c9f6f0.js',
'../tandem/js/PhetioIDUtils.js'
];
// Preloads, with more included for phet-io brand
let preloads = [
'../joist/js/splash.js',
'../sherpa/lib/jquery-2.1.0.js',
'../sherpa/lib/lodash-4.17.4.js',
'../sherpa/lib/FileSaver-b8054a2.js',
'../sherpa/lib/himalaya-0.2.7.js',
'../sherpa/lib/he-1.1.1.js',
'../assert/js/assert.js',
'../query-string-machine/js/QueryStringMachine.js',
'../chipper/js/initialize-globals.js',
'../phet-core/js/copyWithSortedKeys.js',
'../sherpa/lib/seedrandom-2.4.2.js',
'../sherpa/lib/game-up-camera-1.0.0.js',
'../sherpa/lib/base64-js-1.2.0.js',
'../sherpa/lib/TextEncoderLite-3c9f6f0.js',
'../tandem/js/PhetioIDUtils.js'
];

if ( brand === 'phet-io' ) {
preloads = preloads.concat( [
'../phet-io/js/phet-io-initialize-globals.js',
'../blast/js/phet-io/blast-phet-io-elements-baseline.js',
'../blast/js/phet-io/blast-phet-io-elements-overrides.js'
] );
}
if ( brand === 'phet-io' ) {
preloads = preloads.concat( [
'../phet-io/js/phet-io-initialize-globals.js',
'../blast/js/phet-io/blast-phet-io-elements-baseline.js',
'../blast/js/phet-io/blast-phet-io-elements-overrides.js'
] );
}

// Loads a synchronously-executed asynchronously-downloaded script tag, with optional data-main parameter.
// See http://www.html5rocks.com/en/tutorials/speed/script-loading/ for more about script loading. It helps to
// load all of the scripts with this method, so they are treated the same (and placed in the correct execution
// order).
function loadURL( preloadURL, main ) {
var script = document.createElement( 'script' );
if ( typeof main === 'string' ) {
script.setAttribute( 'data-main', main );
}
script.type = 'text/javascript';
script.src = preloadURL;
script.async = false;
document.head.appendChild( script );
// Loads a synchronously-executed asynchronously-downloaded script tag, with optional data-main parameter.
// See http://www.html5rocks.com/en/tutorials/speed/script-loading/ for more about script loading. It helps to
// load all of the scripts with this method, so they are treated the same (and placed in the correct execution
// order).
const loadURL = ( preloadURL, main ) => {
const script = document.createElement( 'script' );
if ( typeof main === 'string' ) {
script.setAttribute( 'data-main', main );
}
script.type = 'text/javascript';
script.src = preloadURL;
script.async = false;
document.head.appendChild( script );
};

// Queue all of the preloads to be loaded.
preloads.forEach( loadURL );
// Queue all of the preloads to be loaded.
preloads.forEach( loadURL );

loadURL( '../sherpa/lib/require-2.3.6.js', 'js/blast-config.js' );
} )();
loadURL( '../sherpa/lib/require-2.3.6.js', 'js/blast-config.js' );
</script>
</body>
</html>
</html>

0 comments on commit 01a68a8

Please sign in to comment.