diff --git a/public_html/js/Main.js b/public_html/js/Main.js
index 8d3844f..e684374 100644
--- a/public_html/js/Main.js
+++ b/public_html/js/Main.js
@@ -1,4 +1,4 @@
-/* global rpyscript, TextUtils */
+/* global rpyscript, TextUtils, userscenario */
var baseResDir = '/resources/es/';
var ViewActivity = null;
@@ -12,7 +12,7 @@ function run(data) {
}
$(document).ready(function() {
- if ( (typeof rpyscript === 'undefined') || TextUtils.isEmpty(rpyscript)) {
+ if ( (typeof rpyscript === 'undefined') || TextUtils.isEmpty(rpyscript)) {
rpyscript = "undefined";
run('play music music_list["everlasting_summer"]\n' +
'scene bg ext_square_day\n' +
@@ -25,6 +25,8 @@ $(document).ready(function() {
'show un smile2 pioneer at center\n' +
'all "Приглашаем тебя в Бесконечное Лето!"');
} else {
- $.get("/resources/es/scripts/" + rpyscript + ".rpy", run);
+ var scriptDir = (typeof userscenario === 'undefined' && userscenario)
+ ? "scripts" : "userscenarios";
+ $.get("/resources/es/" + scriptDir + "/" + rpyscript + ".rpy", run);
}
});