adsad
This commit is contained in:
@@ -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); };
|
||||
|
||||
Reference in New Issue
Block a user