mirror of https://github.com/shadowfacts/type.git
Change to relative path
This commit is contained in:
parent
524d75754b
commit
6140065ba6
|
@ -10,7 +10,7 @@ localforage.keys()
|
|||
repos.forEach((el) => {
|
||||
let li = $("<li></li>");
|
||||
let a = $("<a></a>");
|
||||
a.attr("href", `/repo.html#${el}`);
|
||||
a.attr("href", `./repo.html#${el}`);
|
||||
let div = $("<div></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;
|
||||
|
|
|
@ -7,7 +7,7 @@ localforage.getItem(repo)
|
|||
for (var f in val) {
|
||||
let li = $("<li></li>");
|
||||
let a = $("<a></a>");
|
||||
a.attr("href", `/type.html#${repo}/${f}`);
|
||||
a.attr("href", `./type.html#${repo}/${f}`);
|
||||
let div = $("<div></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 = "./";
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Type</title>
|
||||
<link rel="stylesheet" href="/css/main.css">
|
||||
<link rel="stylesheet" href="./css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -36,6 +36,6 @@
|
|||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.4.2/localforage.min.js"></script>
|
||||
<script src="/js/repo.js"></script>
|
||||
<script src="./js/repo.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue