Tachyon: Set favicon for heatmap pages (#142493)

This commit is contained in:
Stan Ulbrych 2025-12-10 14:10:23 +00:00 committed by GitHub
parent c0d0f4b72a
commit 2db9573e23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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);
}
})();