white space
parent
3cbe7e629f
commit
6bd6575e1c
|
|
@ -45,6 +45,7 @@
|
|||
searchFilesFor(queryQ)
|
||||
}
|
||||
}
|
||||
|
||||
function getParameterByName(name, url = window.location.href) {
|
||||
name = name.replace(/[\[\]]/g, '\\$&');
|
||||
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
|
||||
|
|
@ -53,6 +54,7 @@
|
|||
if (!results[2]) return '';
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
}
|
||||
|
||||
function deleteFile() {
|
||||
if (!confirm("would you like to delete this file?"))
|
||||
return
|
||||
|
|
@ -94,6 +96,7 @@
|
|||
document.getElementById("searchResults").innerHTML = innerHTML
|
||||
})
|
||||
}
|
||||
|
||||
var saveFeedbackInterval = null
|
||||
function pushFile() {
|
||||
const title = document.getElementById("title").innerHTML ? document.getElementById("title").innerHTML : ""
|
||||
|
|
@ -116,6 +119,7 @@
|
|||
saveFeedbackInterval = setTimeout(() => {document.getElementById("saveFeedback").innerHTML = ""}, 5000)
|
||||
}, body, headers)
|
||||
}
|
||||
|
||||
function drawFile(id) {
|
||||
if (!id || id.length < 1) {
|
||||
return
|
||||
|
|
@ -128,17 +132,21 @@
|
|||
setMDE(id, title, body)
|
||||
})
|
||||
}
|
||||
|
||||
function drawNewFile(pid) {
|
||||
setMDE(pid + "/" + crypto.randomUUID().substr(0, 5), "", "")
|
||||
}
|
||||
|
||||
function enableMDE() {
|
||||
document.getElementById("searchResults").style.display = "none";
|
||||
document.getElementById("article").style.display = "";
|
||||
}
|
||||
|
||||
function disableMDE() {
|
||||
document.getElementById("article").style.display = "none";
|
||||
document.getElementById("searchResults").style.display = "";
|
||||
}
|
||||
|
||||
function setMDE(id, title, body) {
|
||||
if (id[0] == "/")
|
||||
id = id.slice(1, id.length)
|
||||
|
|
@ -161,6 +169,7 @@
|
|||
}
|
||||
window.location.hash = "#?f="+id
|
||||
}
|
||||
|
||||
function drawTree() {
|
||||
function htmlifyBranch(id, branch) {
|
||||
var parent = `
|
||||
|
|
@ -195,6 +204,7 @@
|
|||
document.getElementById("tree").innerHTML = htmlifyBranch("", tree)
|
||||
})
|
||||
}
|
||||
|
||||
function http(method, remote, callback, body, headers) {
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.onreadystatechange = function() {
|
||||
|
|
@ -272,6 +282,7 @@
|
|||
codeSyntaxHighlighting: true,
|
||||
},
|
||||
})
|
||||
|
||||
function logValue() {
|
||||
console.log(easyMDE.value())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue