1(function() { 2 'use strict'; 3 4 /* Remove the parent link from Elementor post thumbnails defensively. */ 5 document.addEventListener('DOMContentLoaded', function() { 6 document.querySelectorAll('.elementor-post__thumbnail__link').forEach(function(link) { 7 if (!link || !link.parentNode) { 8 return; 9 } 10 11 while (link.firstChild) { 12 link.parentNode.insertBefore(link.firstChild, link); 13 } 14 link.parentNode.removeChild(link); 15 }); 16 17 /* Remove invalid list roles added by the Elementor Posts widget. */ 18 document.querySelectorAll('article.elementor-post[role="listitem"]').forEach(function(item) { 19 item.removeAttribute('role'); 20 }); 21 document.querySelectorAll('.elementor-posts-container[role="list"]').forEach(function(container) { 22 container.removeAttribute('role'); 23 }); 24 25 /* Add an H2 inside CoBlocks accordion summaries without reparsing innerHTML. */ 26 document.querySelectorAll('.wp-block-coblocks-accordion-item__title').forEach(function(title) { 27 if (title.querySelector(':scope > h2.custom-accordion-heading')) { 28 return; 29 } 30 31 const heading = document.createElement('h2'); 32 heading.className = 'custom-accordion-heading'; 33 while (title.firstChild) { 34 heading.appendChild(title.firstChild); 35 } 36 title.appendChild(heading); 37 }); 38 }); 39 40})();
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.