From e2dac3d42ff6c1319998e188ff9a2cb313018a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A2=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Sun, 9 Aug 2026 15:23:38 +0300 Subject: [PATCH] fix: move cardsLoad() after currentLang init to avoid TDZ error --- index.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index ca0ccc7..39b5ba1 100644 --- a/index.html +++ b/index.html @@ -3638,9 +3638,6 @@ function pysimCustomImport() { // Init custom files pysimCustomLoad(); -// Init cards -cardsLoad(); - // Init sub-tab pills document.querySelectorAll('.pysim-subtab').forEach(btn => { btn.addEventListener('click', () => pysimSwitchSubtab(btn.dataset.pysimSub)); @@ -3763,6 +3760,8 @@ const userLang = (navigator.language || '').split('-')[0]; currentLang = localStorage.getItem('lang') || (userLang === 'ru' ? 'ru' : 'en'); document.getElementById('lang-btn').textContent = currentLang.toUpperCase(); +cardsLoad(); + if (localStorage.getItem('theme') === 'dark' || (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) { document.documentElement.classList.add('dark');