From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Wed, 10 Dec 2025 14:10:23 +0000 (+0000) Subject: Tachyon: Set favicon for heatmap pages (#142493) X-Git-Tag: v3.15.0a3~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2db9573e231e2589f44d50ede5c68c6360f028cd;p=thirdparty%2FPython%2Fcpython.git Tachyon: Set favicon for heatmap pages (#142493) --- diff --git a/Lib/profiling/sampling/_heatmap_assets/heatmap_shared.js b/Lib/profiling/sampling/_heatmap_assets/heatmap_shared.js index f44ebcff4ffe..7fcd720d45d7 100644 --- a/Lib/profiling/sampling/_heatmap_assets/heatmap_shared.js +++ b/Lib/profiling/sampling/_heatmap_assets/heatmap_shared.js @@ -38,3 +38,18 @@ function intensityToColor(intensity) { const rootStyle = getComputedStyle(document.documentElement); return rootStyle.getPropertyValue(`--heat-${level}`).trim(); } + +// ============================================================================ +// Favicon (Reuse logo image as favicon) +// ============================================================================ + +(function() { + const logo = document.querySelector('.brand-logo img'); + if (logo) { + const favicon = document.createElement('link'); + favicon.rel = 'icon'; + favicon.type = 'image/png'; + favicon.href = logo.src; + document.head.appendChild(favicon); + } +})();