mirror of https://github.com/dirtbags/moth.git
Help with this puzzle link
This commit is contained in:
parent
989bc2978e
commit
1b8053d9b5
|
@ -140,3 +140,12 @@ li[draggable] {
|
||||||
#cacheButton.disabled {
|
#cacheButton.disabled {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#help {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #118;
|
||||||
|
padding: 0.25em;
|
||||||
|
border: 1px solid black;
|
||||||
|
font-size: 120%;
|
||||||
|
}
|
|
@ -25,6 +25,7 @@
|
||||||
<input type="hidden" name="xAnswer">
|
<input type="hidden" name="xAnswer">
|
||||||
Team ID: <input type="text" name="id"> <br>
|
Team ID: <input type="text" name="id"> <br>
|
||||||
Answer: <input type="text" name="answer" id="answer"> <span id="answer_ok"></span><br>
|
Answer: <input type="text" name="answer" id="answer"> <span id="answer_ok"></span><br>
|
||||||
|
<a id="help" title="Help with this category" target="_blank" class="hidden">🛈</a>
|
||||||
<input type="submit" value="Submit">
|
<input type="submit" value="Submit">
|
||||||
</form>
|
</form>
|
||||||
<div id="devel"></div>
|
<div id="devel"></div>
|
||||||
|
|
|
@ -151,6 +151,12 @@ function submit(e) {
|
||||||
function loadPuzzle(categoryName, points, puzzleId) {
|
function loadPuzzle(categoryName, points, puzzleId) {
|
||||||
let puzzle = document.getElementById("puzzle")
|
let puzzle = document.getElementById("puzzle")
|
||||||
let base = "content/" + categoryName + "/" + puzzleId + "/"
|
let base = "content/" + categoryName + "/" + puzzleId + "/"
|
||||||
|
|
||||||
|
let helpElement = document.querySelector("#help")
|
||||||
|
if (helpElement) {
|
||||||
|
helpElement.classList.remove("hidden")
|
||||||
|
helpElement.href = "https://mattermost.cyfi.training/cyber-fire/channels/puzzle-" + categoryName
|
||||||
|
}
|
||||||
|
|
||||||
fetch(base + "puzzle.json")
|
fetch(base + "puzzle.json")
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
|
|
Loading…
Reference in New Issue