Added WebDAV syncing
This commit is contained in:
parent
b9e8278689
commit
d5518a164e
13 changed files with 284 additions and 70 deletions
10
js/editor.js
10
js/editor.js
|
|
@ -138,8 +138,8 @@ function createLinkEntry(link = "") {
|
|||
enableInput.addEventListener("change", save);
|
||||
|
||||
function save() {
|
||||
let info = file.info;
|
||||
info.enabled = enableInput.checked;
|
||||
let info = file.info;
|
||||
info.enabled = enableInput.checked;
|
||||
info.name = nameInput.value;
|
||||
info.content = editor.getValue();
|
||||
|
||||
|
|
@ -154,8 +154,10 @@ function save() {
|
|||
}
|
||||
info.links = links;
|
||||
|
||||
file.save();
|
||||
saveBtn.classList.remove("edited");
|
||||
file.touch();
|
||||
file.save();
|
||||
WebDAV.putFile(file.info);
|
||||
saveBtn.classList.remove("edited");
|
||||
}
|
||||
saveBtn.addEventListener("click", save);
|
||||
window.addEventListener("keydown", (e) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue