Hello world com blockly-games
This commit is contained in:
18
html/blockly-games/common/boot.js
Normal file
18
html/blockly-games/common/boot.js
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
// Single-language bootloader.
|
||||
(function() {
|
||||
// Application path.
|
||||
var appName = location.pathname.match(/\/([-\w]+)(\.html)?$/);
|
||||
appName = appName ? appName[1].replace('-', '/') : 'index';
|
||||
|
||||
// Only one language.
|
||||
var lang = 'pt-br';
|
||||
window['BlocklyGamesLanguages'] = [lang];
|
||||
window['BlocklyGamesLang'] = lang;
|
||||
|
||||
// Load the language pack.
|
||||
var script = document.createElement('script');
|
||||
script.src = appName + '/generated/' + lang + '/compressed.js';
|
||||
script.type = 'text/javascript';
|
||||
document.head.appendChild(script);
|
||||
})();
|
||||
Reference in New Issue
Block a user