I guess it won't crash but

This commit is contained in:
Ada Werefox 2024-03-03 20:52:54 -06:00
parent dc4bcb19fa
commit 0b26b2de62
3 changed files with 7 additions and 4 deletions

View File

@ -21,6 +21,7 @@ window.onload = () => {
let mapped_line_elem = document
.getElementById("current_scene_entrances_mapped")
.firstElementChild.cloneNode(true);
const refresh_interval = setInterval(
refresh_elements,
300,
@ -47,7 +48,7 @@ async function refresh_elements(
const overview_entrances_undiscovered =
response_object.Totals.Entrances.Undiscovered;
const overview_entrances_total = response_object.Totals.Entrances.Total;
const current_scene_name = response_object.Scene;
const current_scene_name = response_object.Current.Scene;
const current_scene_checks_undiscovered =
response_object.Scenes[current_scene_name].Totals.Checks.Undiscovered;
const current_scene_checks_total =
@ -88,7 +89,7 @@ async function refresh_elements(
});
})
.catch((err) => {
console.log();
console.log(err);
});
}

View File

@ -113,6 +113,8 @@
</div>
</details>
</div>
{% else %}
<div id="no_data" />
{% endif %}
</div>
</div>

View File

@ -21,12 +21,12 @@ def index(request):
}
template = loader.get_template("tracker/index.html")
return HttpResponse(template.render(context, request))
tracker_output = loads()
tracker_output = loads(request_data)
# with open('spoiler.json', 'r') as t:
# tracker_output = loads(t.read())
tracker_debug = tracker_output["Debug"]
tracker_totals = tracker_output["Totals"]
tracker_current_scene = tracker_output["Scene"]
tracker_current_scene = tracker_output["Current"]["Scene"]
tracker_current_scene_data = tracker_output["Scenes"][tracker_current_scene]
template = loader.get_template("tracker/index.html")
for i in tracker_output["Scenes"]: