chiark / gitweb /
dice: Always provide the label text node
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Apr 2022 11:31:08 +0000 (12:31 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Apr 2022 11:58:27 +0000 (12:58 +0100)
This will give us a way to tell which elements are part of the
cooldown clock and therefore need to be removed when it runs down.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dice/overlay-template-extractor

index 54b15794a6b81960805c9c4ca65176089e47fb0b..2b93f121b3172f9e5203afd3f6c62017c8f340bc 100755 (executable)
@@ -62,9 +62,9 @@ sub filter_text () {
   $node->removeChildNodes();
   $node->appendText('{{ label_text }}');
 }
-p "{% if label_text != \"\" %}\n";
+# This <text> node also acts as the sentinel for when the JS
+# wants to remove the cooldown timer.
 process_node('textlabel', \&filter_text);
-p "{% endif %}\n";
 
 p "{% if cooldown_active %}\n";
 process_node('timeblack', sub {