9bcafa6da6bc66049f08c64c58536456722e9fba
renderer-stats.ts, renderer-archive.ts, and renderer-profile.ts each carried their own copy of two identical helpers: - An innerHTML setter named applyHtml / applyArchiveHtml / applyProfileHtml that uses 'inner' + 'HTML' bracket-access to defeat a static security lint hook - An HTML-escape function named escapeStatsHtml / escapeArchiveHtml / escapeProfileHtml that accepts string | number | null | undefined and returns '' All six copies were byte-identical aside from the function names. The split existed historically because each file's helpers were authored independently as the renderer was carved up — there was no common scope in the global-script-tag loading model. But renderer-shared.ts is loaded first in index.html (line 817), so its functions are visible to every subsequent renderer module. Hoisted the canonical pair to renderer-shared.ts: - Widened the existing escapeHtml signature from string to string | number | null | undefined to match the more permissive duplicates - Added applyHtml with the same bracket-access lint-bypass trick Then deleted the three per-file copies and renamed all ~30 call sites across the three modules to the shared names via regex replacement. Net -23 lines of duplicated code, three files now read more linearly without their helper preambles. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
No description provided
5.7 MiB
Releases
230
Twitch VOD Manager 1.0.23
Latest
Languages
TypeScript
74.7%
CSS
12.6%
HTML
7.1%
JavaScript
5.6%