PageSourceSearch

https://www.ufmg.br//app/mu-plugins/ufmg-favicon-switcher/js/favicon-switcher.js

js ufmg.br collected 2026-09-24 07:24:55 UTC 638 bytes, 22 lines download raw bytes

1document.addEventListener("DOMContentLoaded", () => {
2  if (!window.dftFaviconData) return;
3
4  const { light, dark } = window.dftFaviconData;
5
6  if (!light || !dark) return;
7
8  const updateFavicon = (isDark) => {
9    let link = document.querySelector("link[rel~='icon']");
10    if (!link) {
11      link = document.createElement("link");
12      link.rel = "icon";
13      document.head.appendChild(link);
14    }
15
16    link.href = isDark ? dark : light;
17  };
18
19  const darkScheme = window.matchMedia("(prefers-color-scheme: dark)");
20  updateFavicon(darkScheme.matches);
21  darkScheme.addEventListener("change", (e) => updateFavicon(e.matches));
22});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.