1(function (Drupal) { 2 Drupal.behaviors.blockToggle = { 3 attach: function (context, settings) { 4 const blockToggle = context.querySelectorAll('.block-toggle'); 5 const blocks = context.querySelectorAll('.block'); 6 7 blockToggle.forEach(button => { 8 button.addEventListener('click', function () { 9 const targetId = this.getAttribute('data-target'); 10 11 blocks.forEach(block => { 12 if (block.id === targetId) { 13 block.style.display = 'block'; 14 } else { 15 block.style.display = 'none'; 16 } 17 }); 18 19 blockToggle.forEach(btn => btn.classList.remove('active')); 20 this.classList.add('active'); 21 }); 22 }); 23 } 24 }; 25})(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.