This commit is contained in:
2025-12-06 03:17:46 +01:00
parent d5268a98ac
commit b7de08c9a1
3 changed files with 13 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
<?php
$mode = strtolower($_GET['mode'] ?? 'templates');
$id = (int)($_GET['id'] ?? 0);
$ts = time();
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
?><!doctype html>
<html lang="de">
<head>
@@ -41,7 +41,7 @@ $ts = time();
function loadLocalScript(src, onok){
// Hinzufügen des Cache-Bust-Parameters zur URL
// Die Variable $ts wird durch PHP im HTML-Kontext eingefügt
const url = src + (src.indexOf('?') === -1 ? '?v=' : '&v=') + <?=$ts?>;
const url = src + (src.indexOf('?') === -1 ? '?v=' : '&v=') + <?= json_encode($assetVersion) ?>;
var s=document.createElement('script'); s.src=url; s.async=false;
s.onload=function(){ logToParent('script-ok', src); onok&&onok(); };
s.onerror=function(){ var b=document.getElementById('badge'); if(b){ b.textContent='Fehlt: '+src; b.style.background='#fee2e2'; b.style.color='#7f1d1d'; b.style.borderColor='#fecaca'; } logToParent('script-missing', src); };