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 @@ - +