From 464e69861a5cde8981d20950de794493ac16d448 Mon Sep 17 00:00:00 2001 From: aNNiMON Date: Tue, 27 Feb 2024 23:28:49 +0200 Subject: [PATCH] Fix script dir --- public_html/js/Main.js | 4 ++-- public_html/run.js | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 public_html/run.js diff --git a/public_html/js/Main.js b/public_html/js/Main.js index e684374..32e441e 100644 --- a/public_html/js/Main.js +++ b/public_html/js/Main.js @@ -25,8 +25,8 @@ $(document).ready(function() { 'show un smile2 pioneer at center\n' + 'all "Приглашаем тебя в Бесконечное Лето!"'); } else { - var scriptDir = (typeof userscenario === 'undefined' && userscenario) - ? "scripts" : "userscenarios"; + var scriptDir = (typeof userscenario !== 'undefined') + ? "userscenarios" : "scripts"; $.get("/resources/es/" + scriptDir + "/" + rpyscript + ".rpy", run); } }); diff --git a/public_html/run.js b/public_html/run.js deleted file mode 100644 index 455656d..0000000 --- a/public_html/run.js +++ /dev/null @@ -1,6 +0,0 @@ -/* global rpyscript, TextUtils, userscenario */ -function run(e){var s=new Lexer(e).process().getTokens(),r=new Parser(s) -ViewActivity=new Views(r),ViewActivity.init(),r.next()}var baseResDir="/resources/es/",ViewActivity=null -$(document).ready(function(){if("undefined"==typeof rpyscript||TextUtils.isEmpty(rpyscript))rpyscript="undefined",run('play music music_list["everlasting_summer"]\nscene bg ext_square_day\nshow mz smile pioneer far at fright\nshow us grin sport far at fleft\nshow mt smile pioneer far at right\nshow mi smile pioneer far at left\nshow dv smile pioneer2 at cright\nshow sl smile pioneer at cleft\nshow un smile2 pioneer at center\nall "Приглашаем тебя в Бесконечное Лето!"') -else{var e="undefined"==typeof userscenario&&userscenario?"scripts":"userscenarios" -$.get("/resources/es/"+e+"/"+rpyscript+".rpy",run)}})