From 6140065ba6ff04ef97532a0819f8d52ecc1b64a7 Mon Sep 17 00:00:00 2001 From: Daisuke Oka Date: Wed, 29 Nov 2017 16:14:19 +0900 Subject: [PATCH] Change to relative path --- js/index.js | 4 ++-- js/repo.js | 6 +++--- repo.html | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/js/index.js b/js/index.js index c200a54..9e6d29e 100644 --- a/js/index.js +++ b/js/index.js @@ -10,7 +10,7 @@ localforage.keys() repos.forEach((el) => { let li = $("
  • "); let a = $(""); - a.attr("href", `/repo.html#${el}`); + a.attr("href", `./repo.html#${el}`); let div = $("
    "); div.text(el); a.append(div); @@ -30,7 +30,7 @@ $("#form").submit((event) => { localforage.setItem(`${repo}/${branch}`, {}) .then(() => { - window.location.href = `/repo.html#${repo}/${branch}`; + window.location.href = `./repo.html#${repo}/${branch}`; }) .catch((e) => { throw e; diff --git a/js/repo.js b/js/repo.js index 0303dd1..1513a4c 100644 --- a/js/repo.js +++ b/js/repo.js @@ -7,7 +7,7 @@ localforage.getItem(repo) for (var f in val) { let li = $("
  • "); let a = $(""); - a.attr("href", `/type.html#${repo}/${f}`); + a.attr("href", `./type.html#${repo}/${f}`); let div = $("
    "); div.text(f); a.append(div); @@ -23,9 +23,9 @@ $("#form").submit((event) => { event.preventDefault(); let file = $("#file").val(); - window.location.href = `/type.html#${repo}/${file}`; + window.location.href = `./type.html#${repo}/${file}`; }); $("#back").click(() => { - window.location.href = "/"; + window.location.href = "./"; }); diff --git a/repo.html b/repo.html index d7e3e26..2c71223 100644 --- a/repo.html +++ b/repo.html @@ -3,7 +3,7 @@ Type - + @@ -36,6 +36,6 @@ - +