adasd
This commit is contained in:
@@ -88,11 +88,16 @@ if ($debugEnabled) {
|
||||
select.addEventListener('change', ()=>{
|
||||
const file = select.value;
|
||||
if (!file) { content.innerHTML = '<p class="muted">Log auswählen, um Inhalt zu sehen.</p>'; return; }
|
||||
fetch('/debug?file=' + encodeURIComponent(file))
|
||||
fetch('/debug?file=' + encodeURIComponent(file) + '&raw=1')
|
||||
.then(r => r.text())
|
||||
.then(html => {
|
||||
// naive extract content from /debug page: we just display raw text
|
||||
content.innerHTML = '<pre>'+html.replace(/</g,'<')+'</pre>';
|
||||
.then(text => {
|
||||
const escape = (s) => s
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
content.innerHTML = '<pre>'+escape(text)+'</pre>';
|
||||
})
|
||||
.catch(()=> content.innerHTML = '<p class="muted">Konnte Log nicht laden.</p>');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user