diff --git a/src/web/client/menu_app_play_free.html b/src/web/client/menu_app_play_free.html
new file mode 100644
index 0000000..2bbf190
--- /dev/null
+++ b/src/web/client/menu_app_play_free.html
@@ -0,0 +1,46 @@
+
+
+
+
+ 메뉴
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/web/js/main.js b/src/web/js/main.js
index fd8ee27..63f8bd9 100644
--- a/src/web/js/main.js
+++ b/src/web/js/main.js
@@ -15,17 +15,46 @@ function loadMaestroID() {
console.log("loaded maestroID : " + maestroID);
}
-function saveMaestroID() {
+function saveMaestroID(maestroID) {
sessionStorage.setItem("maestroID", maestroID);
- console.log("saved maestroID : " + maestroID);
+ // console.log("saved maestroID : " + maestroID);
+}
+
+function getParentDirectory(url) {
+ let directories = url.split("/");
+ if(directories.length < 2)
+ return "";
+
+ return directories[directories.length - 2];
+}
+
+function getPage(url) {
+ let directories = url.split("/");
+ if(directories.length < 1)
+ return "";
+
+ return directories[directories.length - 1];
}
function goHome() {
- if(maestroID === -1) {
- location.href = "./../main/index.html";
- } else {
- location.href = "./../maestro/main_menu.html";
+ let url = window.location.href;
+
+ if(getParentDirectory(url) === "maestro") {
+ if(getPage(url) !== "main_menu.html")
+ location.href = "./../maestro/main_menu.html";
+
+ return;
}
+
+ // parent directory is "main"
+ if(getPage(url) === "faq.html") {
+ if(maestroID === -1) {
+ location.href = "./../main/index.html";
+ } else {
+ location.href = "./../maestro/main_menu.html";
+ }
+ } else if(getPage(url) !== "index.html")
+ location.href = "./../main/index.html";
}
function logout() {
diff --git a/src/web/main/index.html b/src/web/main/index.html
index 7fe16a7..bed4bf5 100644
--- a/src/web/main/index.html
+++ b/src/web/main/index.html
@@ -10,8 +10,12 @@
+