From 6e2fb67d76bc044e0e3f761815cf927923fe21a6 Mon Sep 17 00:00:00 2001 From: Ryan Adolf Date: Thu, 24 Oct 2019 16:32:14 -0700 Subject: [PATCH] Theme configuration through url --- src/web/App.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/web/App.mjs b/src/web/App.mjs index 96638f83..bb8d8c9a 100755 --- a/src/web/App.mjs +++ b/src/web/App.mjs @@ -453,6 +453,7 @@ class App { * Searches the URI parameters for recipe and input parameters. * If recipe is present, replaces the current recipe with the recipe provided in the URI. * If input is present, decodes and sets the input to the one provided in the URI. + * If theme is present, uses the theme. * * @fires Manager#statechange */ @@ -491,6 +492,10 @@ class App { } catch (err) {} } + if (this.uriParams.theme) { + document.querySelector(":root").className = this.uriParams.theme; + } + this.autoBakePause = false; window.dispatchEvent(this.manager.statechange); }