1(function (Drupal) { 2 Drupal.behaviors.viewActiveLinks = { 3 attach: function (context, settings) { 4 // Targets links within your view that match the current path 5 const currentPath = window.location.pathname; 6 // This matches Views block secondary nav version and Paragraph secondary nav version. 7 const viewLinks = context.querySelectorAll('.treas-secondary-nav a[href="' + currentPath + '"]'); 8 9 viewLinks.forEach(function (link) { 10 link.classList.add('active'); // or 'is-active' to match Drupal core 11 }); 12 } 13 }; 14})(Drupal);
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.