]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Tachyon: Set favicon for heatmap pages (#142493)
authorStan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Wed, 10 Dec 2025 14:10:23 +0000 (14:10 +0000)
committerGitHub <noreply@github.com>
Wed, 10 Dec 2025 14:10:23 +0000 (14:10 +0000)
Lib/profiling/sampling/_heatmap_assets/heatmap_shared.js

index f44ebcff4ffe89006660554d7de610591ad8bf5c..7fcd720d45d7b32060eef2bac949453b59677030 100644 (file)
@@ -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);
+    }
+})();