Add missing JSON.parse, proper random id generation and more images #34

Merged
sixtus merged 3 commits from improve_thanks into main 2022-02-27 11:12:03 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 7ca8fa85ba - Show all commits

View File

@ -10,7 +10,7 @@
<script>
document.addEventListener("DOMContentLoaded", function() {
const container = document.getElementById("{{ $id }}");
const choices = {{ $choices }};
const choices = JSON.parse(`{{ $choices }}`);
if (!container || !choices) { return; }
const img = document.createElement("img");
img.alt = "{{ $alt }}";