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;