From dc8fe2b45908cf23c38dbf4ab2a8a85a6baac7ef Mon Sep 17 00:00:00 2001 From: zombieFox Date: Sat, 23 Feb 2019 14:20:58 +0000 Subject: [PATCH] [feature] add accent randomise control to menu --- index.html | 5 ++++- js/control.js | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 00060d3b..cf8f3e77 100644 --- a/index.html +++ b/index.html @@ -383,10 +383,13 @@ -
+
+
+ +
diff --git a/js/control.js b/js/control.js index 4a7fda97..cb79906d 100644 --- a/js/control.js +++ b/js/control.js @@ -491,6 +491,13 @@ var control = (function() { func: function() { render(); } + }, { + element: helper.e(".control-layout-theme-randomise"), + type: "button", + func: function() { + theme.random(); + theme.render(); + } }, { element: helper.e(".control-background-image-show"), path: "background.image.show", @@ -856,10 +863,12 @@ var control = (function() { if (state.get().layout.theme.random.active) { helper.eA("input[name='control-layout-theme-style']").forEach(function(arrayItem, index) { arrayItem.disabled = false; + helper.e(".control-layout-theme-randomise").disabled = false; }); } else { helper.eA("input[name='control-layout-theme-style']").forEach(function(arrayItem, index) { arrayItem.disabled = true; + helper.e(".control-layout-theme-randomise").disabled = true; }); }; };