Refactor cache handling for plugins: update pluginsData initialization and improve fetch logic; enhance UI tests for translation loading

This commit is contained in:
Jokob @NetAlertX
2026-07-02 04:32:01 +00:00
parent 268347e187
commit 35b19cbb51
3 changed files with 41 additions and 18 deletions

View File

@@ -312,7 +312,7 @@ async function getData() {
// module-level fetchJson defined in cache.js, which returns res['data'] and
// is used by cachePluginStrings() during app initialization.
async function fetchPluginJson(filename) {
const response = await fetch(`php/server/query_json.php?file=${filename}`);
const response = await fetch(`php/server/query_json.php?file=${encodeURIComponent(filename)}&nocache=${Date.now()}`);
if (!response.ok) throw new Error(`Failed to load ${filename}`);
return await response.json();
}