- Fix links not showing up in webinterface

- Switch to debug logging
This commit is contained in:
Infi
2026-02-09 11:32:06 +01:00
parent 638ec1a211
commit 4341035c74
7 changed files with 14 additions and 7 deletions
+8 -1
View File
@@ -241,14 +241,21 @@ export class ChatTwoWeb {
processUrlTemplate(template: Template, spanElement: HTMLSpanElement) {
const urlElement = document.createElement('a');
let url = template.content;
if (!url.startsWith('https://')) {
url = `https://${url}`;
}
urlElement.innerText = template.content;
urlElement.href = encodeURI(template.content);
urlElement.href = encodeURI(url);
urlElement.target = '_blank'
if (template.color !== 0)
{
this.processColor(template, spanElement);
}
spanElement.appendChild(urlElement);
}
// converts a RGBA uint number to components