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