mirror of https://github.com/dirtbags/moth.git
Compare commits
No commits in common. "259ad59755b81834694da339b306cb625947d57a" and "7c5b5b5ccf38e5b7f2c7b6e5a88cf61d23d92891" have entirely different histories.
259ad59755
...
7c5b5b5ccf
29
CHANGELOG.md
29
CHANGELOG.md
|
@ -4,35 +4,6 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [v4.6.1] - 2024-04-17
|
|
||||||
### Changed
|
|
||||||
- Fixed bug with solved puzzle tracking when config.json cannot be loaded.
|
|
||||||
|
|
||||||
## [v4.6.0] - 2024-04-17
|
|
||||||
### Changed
|
|
||||||
- Mothd now correctly handles using the current directory for a path.
|
|
||||||
For instance, `-puzzles .`
|
|
||||||
- Theme configuration has a new structure:
|
|
||||||
old theme config files need to be modified
|
|
||||||
- Theme now omits the qix animation in the background
|
|
||||||
if the user has configured the browser to reduce motion.
|
|
||||||
This should help people with vestibular motion disorders,
|
|
||||||
or people who are annoyed by the animation.
|
|
||||||
- Theme colors are now specified with CSS variables,
|
|
||||||
making the theme (hopefully) easier to re-color.
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- Theme: brought back integrated Python IDE,
|
|
||||||
with updated versions of CodeJar and Prism.js.
|
|
||||||
These depend on a CDN, but if it cannot be reached,
|
|
||||||
there is a graceful fallback.
|
|
||||||
- Theme (nearly) instantly updates the list of open puzzles
|
|
||||||
when a puzzle is solved.
|
|
||||||
Users should no longer need to refresh the index after solving a puzzle.
|
|
||||||
- Theme fires confetti 🎊 when a puzzle is answered correctly.
|
|
||||||
This requires a CDN; if unreachable, everything still works.
|
|
||||||
- Theme closes the tab a few seconds after a puzzle is answered
|
|
||||||
correctly.
|
|
||||||
|
|
||||||
## [v4.5.0] - 2024-01-19
|
## [v4.5.0] - 2024-01-19
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -130,7 +130,7 @@ Both came with the following license:
|
||||||
|
|
||||||
|
|
||||||
Go Fonts
|
Go Fonts
|
||||||
-------
|
=======
|
||||||
|
|
||||||
The Go fonts were obtained from
|
The Go fonts were obtained from
|
||||||
https://go.googlesource.com/image
|
https://go.googlesource.com/image
|
||||||
|
|
|
@ -48,7 +48,7 @@ function WhenDOMLoaded(cb) {
|
||||||
* @param {String} s
|
* @param {String} s
|
||||||
* @returns {Boolean}
|
* @returns {Boolean}
|
||||||
*/
|
*/
|
||||||
function StringTruthy(s) {
|
function Truthy(s) {
|
||||||
switch (s.toLowerCase()) {
|
switch (s.toLowerCase()) {
|
||||||
case "disabled":
|
case "disabled":
|
||||||
case "no":
|
case "no":
|
||||||
|
@ -66,20 +66,13 @@ function StringTruthy(s) {
|
||||||
* @returns {Promise.<Object>}
|
* @returns {Promise.<Object>}
|
||||||
*/
|
*/
|
||||||
async function Config() {
|
async function Config() {
|
||||||
let obj = {}
|
let resp = await fetch(
|
||||||
try {
|
new URL("config.json", BaseURL),
|
||||||
let resp = await fetch(
|
{
|
||||||
new URL("configg.json", BaseURL),
|
cache: "no-cache"
|
||||||
{
|
},
|
||||||
cache: "no-cache"
|
)
|
||||||
},
|
return resp.json()
|
||||||
)
|
|
||||||
obj = await resp.json()
|
|
||||||
}
|
|
||||||
catch(err) {
|
|
||||||
obj = {}
|
|
||||||
}
|
|
||||||
return obj
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
@ -90,6 +83,6 @@ export {
|
||||||
BaseURL,
|
BaseURL,
|
||||||
Toast,
|
Toast,
|
||||||
WhenDOMLoaded,
|
WhenDOMLoaded,
|
||||||
StringTruthy,
|
Truthy,
|
||||||
Config,
|
Config,
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
Solved puzzle tracking: <b>disabled</b>.
|
Solved puzzle tracking: <b>disabled</b>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
To avoid duplication of work, your team should coordinate.
|
Your team's Incident Coordinator can help coordinate team activity.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -92,10 +92,8 @@ class App {
|
||||||
|
|
||||||
// Update elements with data-track-solved
|
// Update elements with data-track-solved
|
||||||
for (let e of document.querySelectorAll("[data-track-solved]")) {
|
for (let e of document.querySelectorAll("[data-track-solved]")) {
|
||||||
// Only hide if data-track-solved is different than config.PuzzleList.TrackSolved
|
// Only display if data-track-solved is the same as config.trackSolved
|
||||||
let tracking = this.config.PuzzleList?.TrackSolved || false
|
e.classList.toggle("hidden", common.Truthy(e.dataset.trackSolved) != this.config.PuzzleList?.TrackSolved)
|
||||||
let displayIf = common.StringTruthy(e.dataset.trackSolved)
|
|
||||||
e.classList.toggle("hidden", tracking != displayIf)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let e of document.querySelectorAll(".login")) {
|
for (let e of document.querySelectorAll(".login")) {
|
||||||
|
|
|
@ -3,6 +3,11 @@
|
||||||
src: url("fonts/Go-Regular.ttf");
|
src: url("fonts/Go-Regular.ttf");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Go-Mono";
|
||||||
|
src: url("fonts/Go-Mono.ttf");
|
||||||
|
}
|
||||||
|
|
||||||
/** Workspace
|
/** Workspace
|
||||||
*
|
*
|
||||||
* Tools for this puzzle: shows up in content.
|
* Tools for this puzzle: shows up in content.
|
||||||
|
|
Loading…
Reference in New Issue