Skip to content

Commit

Permalink
gui.js updated with the pony base
Browse files Browse the repository at this point in the history
  • Loading branch information
JasminDreasond committed Feb 13, 2021
1 parent a8ab90e commit 171284d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ var firstLoading = true;

var oldConfig = {};
var PonyScripts = {
'browser-ponies-base': absUrl('js/ponybase.js'),
'browser-ponies-script': absUrl('js/browserponies.js'),
'browser-ponies-script': absUrl('js/browserponies.js'),
'browser-ponies-config': absUrl('js/basecfg.js'),
'browser-ponies-base': absUrl('js/ponycfg.js')
'browser-ponies-cfg': absUrl('js/ponycfg.js')
};

function loadingJson(script) {
Expand Down Expand Up @@ -61,6 +63,7 @@ function embedCode(config) {
copy.autostart = true;
return (
'<script type="text/javascript" src="' + PonyScripts['browser-ponies-base'] + '"></script>' +
'<script type="text/javascript" src="' + PonyScripts['browser-ponies-cfg'] + '"></script>' +
'<script type="text/javascript" src="' + PonyScripts['browser-ponies-config'] + '" id="browser-ponies-config"></script>' +
'<script type="text/javascript" src="' + PonyScripts['browser-ponies-script'] + '" id="browser-ponies-script"></script>' +
'<script type="text/javascript">/* <![CDATA[ */ ' +
Expand Down Expand Up @@ -854,6 +857,9 @@ function ownPoniesScript() {
delete config.spawn;
}
if (config.interactions.length === 0) delete config.interactions;
config = JSON.stringify(config)
.replace('BrowserPoniesBaseConfig.interactions', JSON.stringify(BrowserPoniesBaseConfig.interactions))
.replace('BrowserPoniesBaseConfig.ponies', JSON.stringify(BrowserPoniesBaseConfig.ponies));

return "BrowserPonies.loadConfig(" + JSON.stringify(config) + ");";
}
Expand Down

0 comments on commit 171284d

Please sign in to comment.