Add version selection

This commit is contained in:
Misode
2019-09-12 19:27:03 +02:00
parent 9fb7f21311
commit 86d5dab3f1
8 changed files with 199 additions and 14 deletions
+9 -5
View File
@@ -1,11 +1,15 @@
let structure;
let components;
$.getJSON('structure.json', json => {
structure = json.root;
components = json.components;
invalidated();
});
changeVersion('1.14');
function changeVersion(version) {
$.getJSON('schemas/' + version + '.json', json => {
$('#versionLabel').text(version);
structure = json.root;
components = json.components;
invalidated();
});
}
function invalidated() {
if (structure) {