Compare commits
3 Commits
v0.0.1
...
d32d8059bb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d32d8059bb | ||
|
|
64e992c6b6 | ||
|
|
0fd0981a39 |
@@ -17,6 +17,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<!--{{USER}}-->
|
<!--{{USER}}-->
|
||||||
<form id="flash" action="">
|
<form id="flash" action="">
|
||||||
|
<h1 name="status"></h1>
|
||||||
<input type="text" name="idq" readonly=true value="" style="display: none;">
|
<input type="text" name="idq" readonly=true value="" style="display: none;">
|
||||||
<div name="question"></div>
|
<div name="question"></div>
|
||||||
<div name="clues"></div>
|
<div name="clues"></div>
|
||||||
@@ -36,6 +37,18 @@
|
|||||||
map((key) => [
|
map((key) => [
|
||||||
[key, knowledgebase[key]]
|
[key, knowledgebase[key]]
|
||||||
])
|
])
|
||||||
|
function shuffle(array) {
|
||||||
|
let currentIndex = array.length, randomIndex;
|
||||||
|
while (currentIndex != 0) {
|
||||||
|
randomIndex = Math.floor(Math.random() * currentIndex);
|
||||||
|
currentIndex--;
|
||||||
|
[array[currentIndex], array[randomIndex]] = [
|
||||||
|
array[randomIndex], array[currentIndex]];
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
shuffle(knowledgebase)
|
||||||
|
|
||||||
console.log(0, knowledgebase)
|
console.log(0, knowledgebase)
|
||||||
|
|
||||||
function passQuestion(form) {
|
function passQuestion(form) {
|
||||||
@@ -92,9 +105,15 @@
|
|||||||
todo = ["", {Q: "ALL DONE"}]
|
todo = ["", {Q: "ALL DONE"}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
form.children.status.innerHTML = knowledgebase.length.toString()
|
||||||
|
|
||||||
form.children.idq.value = todo[0]
|
form.children.idq.value = todo[0]
|
||||||
|
|
||||||
form.children.question.innerHTML = `<h3>${todo[1].Q}</h3>`
|
if (todo[1].Q.startsWith("img:")) {
|
||||||
|
form.children.question.innerHTML = `<img src="static/${todo[1].Q.slice(4, 1000)}"/>`
|
||||||
|
} else {
|
||||||
|
form.children.question.innerHTML = `<h3>${todo[1].Q}</h3>`
|
||||||
|
}
|
||||||
form.children.question.value = todo[1].Q
|
form.children.question.value = todo[1].Q
|
||||||
|
|
||||||
let clues = ""
|
let clues = ""
|
||||||
|
|||||||
@@ -3,9 +3,7 @@ todo:
|
|||||||
- exemplary answers; declaring
|
- exemplary answers; declaring
|
||||||
- exemplary answers; sharing
|
- exemplary answers; sharing
|
||||||
- tags; declare mastery
|
- tags; declare mastery
|
||||||
- tags; assign to a user
|
|
||||||
- entrypoint; explicit answer all
|
- entrypoint; explicit answer all
|
||||||
- entrypoint; answer tag
|
|
||||||
- entrypoint; edit question
|
- entrypoint; edit question
|
||||||
- entrypoint; delete question
|
- entrypoint; delete question
|
||||||
- ascii images from url
|
- ascii images from url
|
||||||
@@ -31,3 +29,7 @@ done:
|
|||||||
ts: Fri Apr 7 10:46:14 MDT 2023
|
ts: Fri Apr 7 10:46:14 MDT 2023
|
||||||
- todo: entrypoint; create question
|
- todo: entrypoint; create question
|
||||||
ts: Fri Apr 7 10:46:14 MDT 2023
|
ts: Fri Apr 7 10:46:14 MDT 2023
|
||||||
|
- todo: tags; assign to a user
|
||||||
|
ts: Fri Apr 7 14:06:39 MDT 2023
|
||||||
|
- todo: entrypoint; answer tag
|
||||||
|
ts: Fri Apr 7 14:06:39 MDT 2023
|
||||||
|
|||||||
Reference in New Issue
Block a user