Remove file name input from index

This commit is contained in:
Shadowfacts 2016-10-02 11:06:41 -04:00
parent ce86403466
commit 81b730ff23
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 8 additions and 4 deletions

View File

@ -26,8 +26,6 @@
<br>
<input type="text" id="branch" value="master" placeholder="master" required="true">
<br>
<input type="text" id="file" placeholder="path/to/file.js" required="true">
<br>
<input type="submit" value="Type">
</form>

View File

@ -27,6 +27,12 @@ $("#form").submit((event) => {
let repo = $("#repo").val();
let branch = $("#branch").val();
let file = $("#file").val();
window.location.href = `/type.html#${repo}/${branch}/${file}`;
localforage.setItem(`${repo}/${branch}`, {})
.then(() => {
window.location.href = `/repo.html#${repo}/${branch}`;
})
.catch((e) => {
throw e;
});
});