From 6bd6575e1c149aeec36336376b085a045cbca052 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Wed, 9 Feb 2022 16:27:57 -0700 Subject: [PATCH] white space --- spike/review/reinvent/ezmded/ui/index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spike/review/reinvent/ezmded/ui/index.html b/spike/review/reinvent/ezmded/ui/index.html index fbcc563..4f82ebc 100644 --- a/spike/review/reinvent/ezmded/ui/index.html +++ b/spike/review/reinvent/ezmded/ui/index.html @@ -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()) }