Take advantage of compiled palettes

More robust because previously we couldn't cope with indirect palette entries in these situations
This commit is contained in:
Jeremy Ruston
2025-02-06 12:55:45 +00:00
parent bfea62b43b
commit 1f4f164d5e
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ function FramedEngine(options) {
this.parentNode.insertBefore(this.iframeNode,this.nextSibling);
this.iframeDoc = this.iframeNode.contentWindow.document;
// (Firefox requires us to put some empty content in the iframe)
var paletteTitle = this.widget.wiki.getTiddlerText("$:/palette");
var paletteTitle = this.widget.wiki.getTiddlerText("$:/palette/palette-colours");
var colorScheme = (this.widget.wiki.getTiddler(paletteTitle) || {fields: {}}).fields["color-scheme"] || "light";
this.iframeDoc.open();
this.iframeDoc.write("<meta name='color-scheme' content='" + colorScheme + "'>");