mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-05 17:07:43 +00:00
fix: use absolute /version.json path to work on all page depths
The old logic only handled en='version.json' and non-en='../version.json', which broke on /alternatives/ and /de/alternatives/ pages. Absolute path works for root, /de/, /alternatives/, /de/alternatives/ etc.
This commit is contained in:
+1
-1
@@ -331,7 +331,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
const updateDynamicVersion = async () => {
|
||||
try {
|
||||
const versionPath = document.documentElement.lang === 'en' ? 'version.json' : '../version.json';
|
||||
const versionPath = '/version.json';
|
||||
const response = await fetch(versionPath);
|
||||
if (!response.ok) return;
|
||||
const data = await response.json();
|
||||
|
||||
Reference in New Issue
Block a user