Skip to content

Commit 2db9573

Browse files
Tachyon: Set favicon for heatmap pages (#142493)
1 parent c0d0f4b commit 2db9573

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Lib/profiling/sampling/_heatmap_assets/heatmap_shared.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,18 @@ function intensityToColor(intensity) {
3838
const rootStyle = getComputedStyle(document.documentElement);
3939
return rootStyle.getPropertyValue(`--heat-${level}`).trim();
4040
}
41+
42+
// ============================================================================
43+
// Favicon (Reuse logo image as favicon)
44+
// ============================================================================
45+
46+
(function() {
47+
const logo = document.querySelector('.brand-logo img');
48+
if (logo) {
49+
const favicon = document.createElement('link');
50+
favicon.rel = 'icon';
51+
favicon.type = 'image/png';
52+
favicon.href = logo.src;
53+
document.head.appendChild(favicon);
54+
}
55+
})();

0 commit comments

Comments
 (0)