1/** 2 * Code to add accessibility features 3 */ 4document.addEventListener('DOMContentLoaded', function() { 5 const loadingScreen = document.querySelector('.loading-screen'); 6 7 // Function to check if the loading screen is hidden 8 function checkLoadingScreen() { 9 if (loadingScreen && window.getComputedStyle(loadingScreen).display === 'none') { 10 // Select all buttons with the disabled class 11 document.querySelectorAll('.single_add_to_cart_button.disabled').forEach(button => { 12 button.setAttribute('aria-disabled', 'true'); 13 }); 14 15 document.querySelectorAll('.woocommerce-product-gallery__image > a').forEach(button => { 16 button.setAttribute('aria-describedby', 'enlarge image image'); 17 }); 18 19 } 20 } 21 22 checkLoadingScreen(); 23 24 // Detect changes in the loading screen 25 const observer = new MutationObserver(checkLoadingScreen); 26 observer.observe(loadingScreen, { attributes: true, attributeFilter: ['style'] }); 27});
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.