GitHub Actions commited on
Commit ·
e90c416
1
Parent(s): 958c204
Sync from GitHub repo
Browse files188 unmodified lines189190191192193194195196197829 unmodified lines1027102810291030103110321033103410351036103710381039104010411042104310441045188 unmodified lines</div></div><!-- Hidden element to store fallback sentences data --><div id="fallback-sentences-data" data-sentences="{{ harvard_sentences | tojson | safe }}" style="display: none;"></div>{% endblock %}{% block extra_head %}829 unmodified lines});});// Fallback random text options (if cache is unavailable)let fallbackRandomTexts = [];try {const dataElement = document.getElementById('fallback-sentences-data');if (dataElement && dataElement.dataset.sentences) {fallbackRandomTexts = JSON.parse(dataElement.dataset.sentences);} else {console.error("Fallback sentences data element not found or empty.");}} catch (e) {console.error("Error parsing fallback sentences from data attribute:", e);// fallbackRandomTexts remains an empty array if parsing fails}// Fetch cached sentences on loadfunction fetchCachedSentences() {188 unmodified lines189190191192193194829 unmodified lines102410251026102710281029103010311032188 unmodified lines</div></div>{% endblock %}{% block extra_head %}829 unmodified lines});});// Load fallback sentences directly from Flask variable (JSON string)// Note: This might cause linter errors, but JSON is JS-compatible.const fallbackRandomTexts = JSON.parse({{ harvard_sentences | tojson | safe }});// Fetch cached sentences on loadfunction fetchCachedSentences() {
templates/arena.html+3-16