mirror of
https://github.com/python/cpython.git
synced 2026-01-08 16:32:55 +00:00
Tachyon: Set favicon for heatmap pages (#142493)
This commit is contained in:
parent
c0d0f4b72a
commit
2db9573e23
1 changed files with 15 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue