From 1349f628930f101a4263ad96a09a67f1e7a93f2d Mon Sep 17 00:00:00 2001 From: maskedmonkyman Date: Tue, 22 Mar 2022 13:11:37 -0700 Subject: [PATCH] made it so that config rules load in alphabetical order --- config_tool.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config_tool.html b/config_tool.html index ee42c90..fe48f9d 100644 --- a/config_tool.html +++ b/config_tool.html @@ -332,9 +332,13 @@ modes_list.innerHTML = ""; reader.addEventListener("load", (event) => { let vote_rules = JSON.parse(event.target.result); + for (let mode of vote_rules.modes) add_mode(mode); - for (let rule in vote_rules.rules) + + let rules = Object.keys(vote_rules.rules).sort() + + for (let rule of rules) { let rule_element = build_rule_element(); rule_element.rule_string_input.value = rule;