1jQuery(document).ready(function($) { 2 // Function to apply link modification 3 function applyLinkModification() { 4 // Check screen width 5 if (window.innerWidth > 1024) { 6 // Find the element with the class .cc-nav-dropdown__button--title containing the text "Projekte" 7 var projekteElement = $('.projectlink .cc-nav-dropdown__button--title:contains("Projekte")'); 8 9 // Check if the element is found 10 if (projekteElement.length > 0) { 11 // Create a link with the existing text as its content 12 var link = $('<a>', { 13 href: customScriptData.link_url, // Use the link URL from the localized data 14 text: "Projekte", 15 class: 'custom-link-style', // Add a custom CSS class to the link 16 //style: 'font-weight: 300;' // Set the font-weight style directly 17 }); 18 19 // Replace only the contents of the existing element with the link 20 projekteElement.html(link); 21 } 22 } 23 } 24 25 // Initial application on document ready 26 applyLinkModification(); 27 28 // Attach the function to the window resize event 29 $(window).resize(function() { 30 // Reapply the link modification on window resize 31 applyLinkModification(); 32 }); 33});
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.