From 5fa8567801f4bd730671ab81e38b792154307ea2 Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Tue, 26 Aug 2025 08:48:29 +0800 Subject: [PATCH] Removes the log for unknown script tags Some sites have a lot of text/template or application/json, and it just adds noise to the logs. --- src/browser/ScriptManager.zig | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/browser/ScriptManager.zig b/src/browser/ScriptManager.zig index bbed5633..22d3a16a 100644 --- a/src/browser/ScriptManager.zig +++ b/src/browser/ScriptManager.zig @@ -136,14 +136,10 @@ pub fn addFromElement(self: *ScriptManager, element: *parser.Element) !void { if (std.ascii.eqlIgnoreCase(script_type, "module")) { break :blk .module; } - if (std.ascii.eqlIgnoreCase(script_type, "application/json")) { - return; - } - if (std.ascii.eqlIgnoreCase(script_type, "application/ld+json")) { - return; - } - log.warn(.user_script, "unknown script type", .{ .type = script_type }); + // "type" could be anything, but only the above are ones we need to process. + // Common other ones are application/json, application/ld+json, text/template + return; };