From a02aa8df0929a3ea7a51e2f88d1cc60c7076eca9 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 6 Jun 2022 23:56:17 +0200 Subject: [PATCH] word/finder: enable stylesheet on #debug option --- word-debug.css => word/debug.css | 0 word/finder.js | 4 ++++ 2 files changed, 4 insertions(+) rename word-debug.css => word/debug.css (100%) diff --git a/word-debug.css b/word/debug.css similarity index 100% rename from word-debug.css rename to word/debug.css diff --git a/word/finder.js b/word/finder.js index 86442c9..e720bfd 100644 --- a/word/finder.js +++ b/word/finder.js @@ -23,6 +23,7 @@ class WordFinder extends WordQuiz { innerHTML: this.namehtml(title), }); } + put(worditem, '.level' + level); if (level <= 1 && subs.length >= 4) { put(worditem, '.large'); } @@ -45,6 +46,9 @@ class WordFinder extends WordQuiz { setup() { super.setup(); + if (this.preset.debug) { + put(document.head, 'link', {rel: 'stylesheet', href: '/word/debug.css'}); + } this.form.innerHTML = ''; put(this.form, 'p', 'Under construction.'); for (let cat of this.preset.cat || this.data[''][3]) { -- 2.30.0