Bugfixes (Dark Mode, Dropdown-Kontrast, IP-Suche), Lesezeichen-Ausbau (Farbe, Beschreibung, Favicon), Zuletzt-besucht, Spaeter-lesen, kombinierter Import-Export, Scanner-Reconciliation, Admin-Ueberarbeitung

This commit is contained in:
2026-07-20 07:52:38 +02:00
parent dc91a9aba9
commit 96cf29fef4
37 changed files with 1988 additions and 494 deletions

View File

@@ -6,6 +6,7 @@ export interface HttpProbeResult {
status?: number;
title?: string;
faviconUrl?: string;
description?: string;
server?: string;
bodySnippet?: string;
}
@@ -46,6 +47,7 @@ export function probeHttp(baseUrl: string, timeoutMs = 2000): Promise<HttpProbeR
status: res.statusCode,
title: extractTitle(body),
faviconUrl: extractFaviconUrl(body, baseUrl),
description: extractDescription(body),
server: Array.isArray(serverHeader) ? serverHeader[0] : serverHeader,
bodySnippet: body,
});
@@ -82,3 +84,12 @@ function extractFaviconUrl(html: string, baseUrl: string): string | undefined {
return undefined;
}
}
function extractDescription(html: string): string | undefined {
// <meta name="description" content="..."> in beiden Attribut-Reihenfolgen
const match =
html.match(/<meta[^>]+name=["']description["'][^>]+content=["']([^"']*)["']/i) ??
html.match(/<meta[^>]+content=["']([^"']*)["'][^>]+name=["']description["']/i);
const description = match?.[1]?.trim();
return description ? description : undefined;
}