1(function () { 2 'use strict'; 3 4 function injectSiteLogoTitle() { 5 const container = document.querySelector('.wp-block-navigation__responsive-dialog'); 6 if (!container) return; 7 8 if (container.querySelector('.site-logo-title')) return; 9 10 if (!window.ExtendableNavData) return; 11 12 const { logoUrl, siteTitle } = window.ExtendableNavData; 13 const hasSiteTitle = !!document.querySelector('header.wp-block-template-part .wp-block-site-title'); 14 15 const wrapper = document.createElement('div'); 16 wrapper.className = 'site-logo-title wp-block-site-logo'; 17 wrapper.innerHTML = ` 18 ${logoUrl ? `<img src="${logoUrl}" alt="Site Logo" class="mobile-logo" />` : ''} 19 ${hasSiteTitle ? `<span class="site-title">${siteTitle || ''}</span>` : ''} 20 `; 21 container.prepend(wrapper); 22 } 23 24 if (document.readyState === 'loading') { 25 document.addEventListener('DOMContentLoaded', injectSiteLogoTitle); 26 } else { 27 injectSiteLogoTitle(); 28 } 29})();
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.