PageSourceSearch

https://tochucsukien.com.vn/wp-content/themes/phg-kadence-child-event/assets/js/navigation.js?ver=1777805211

js tochucsukien.com.vn collected 2026-10-03 17:55:57 UTC 1,998 bytes, 62 lines download raw bytes

1(() => {
2  const LOGO_URL = 'https://tochucsukien.com.vn/wp-content/uploads/2026/05/To-chuc-su-kien-Phat-Hoang-Gia-logo.webp';
3  const LOGO_ALT = 'Phát Hoàng Gia Event';
4
5  function getBrandingNodes(scope) {
6    if (!scope) return [];
7    const selectors = [
8      '.site-branding',
9      '.site-header-item-branding',
10      '.site-logo',
11      '.mobile-site-branding',
12      '.site-header-item-mobile-logo',
13      '.mobile-header-logo'
14    ];
15
16    const nodes = Array.from(scope.querySelectorAll(selectors.join(', ')));
17    return Array.from(new Set(nodes)).filter((node) => node && !node.dataset.phgLogoProcessed);
18  }
19
20  function applyLogoToBranding(branding) {
21    if (!branding) return;
22
23    branding.querySelectorAll('.site-title, .site-description, .phg-header-brand-wordmark').forEach((el) => {
24      el.remove();
25    });
26
27    const homeUrl = window.location.origin + '/';
28    let link = branding.querySelector('.custom-logo-link, .phg-brand-replaced, a');
29
30    if (!link) {
31      link = document.createElement('a');
32      branding.prepend(link);
33    }
34
35    link.classList.add('phg-brand-replaced');
36    link.setAttribute('href', homeUrl);
37    link.setAttribute('aria-label', LOGO_ALT);
38    link.innerHTML = `<img src="${LOGO_URL}" alt="${LOGO_ALT}" class="phg-header-brand-image" loading="eager" decoding="async">`;
39
40    branding.dataset.phgLogoProcessed = '1';
41  }
42
43  function mountHeaderLogo() {
44    const masthead = document.querySelector('#masthead') || document.querySelector('.site-header');
45    if (!masthead) return;
46
47    const brandings = getBrandingNodes(masthead);
48    if (!brandings.length) return;
49
50    brandings.forEach(applyLogoToBranding);
51  }
52
53  if (document.readyState === 'loading') {
54    document.addEventListener('DOMContentLoaded', mountHeaderLogo, { once: true });
55  } else {
56    mountHeaderLogo();
57  }
58
59  window.addEventListener('load', mountHeaderLogo, { once: true });
60  window.setTimeout(mountHeaderLogo, 250);
61  window.setTimeout(mountHeaderLogo, 900);
62})();

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.