1function bneSearchDocuments($) { 2 let textToSearch = $('.bne-csearch-text').val(); 3 if (textToSearch) { 4 textToSearch = textToSearch.replace(/[.*+?^${}()\[\]\\]/g, "\\$&"); 5 let pattern = new RegExp(textToSearch, "gi"); 6 7 var resultCount = 0; 8 var firstElement = false; 9 $('.bne-csearch-btn').closest('.brxe-container').find('.post-list-card__label, .post-list-card__post-date, .post-list-card__heading > a, .post-list-card__text').each(function(){ 10 paragraph = $(this).get(0); 11 let matches = $(this).html().match(pattern); 12 if (matches && matches.length > 0) { 13 paragraph.innerHTML = paragraph.textContent.replace(pattern,(match) => `<mark>${match}</mark>`); 14 resultCount += matches.length; 15 if (!firstElement) 16 firstElement = paragraph; 17 } else { 18 // Reset paragraph content and display no results message in red color 19 paragraph.innerHTML = paragraph.textContent; 20 } 21 22 }); 23 if (resultCount > 0) { 24 $('.bne-csearch-result').text(resultCount + ' Suchtreffer'); 25 $('.bne-csearch-result').addClass('bne-csearch-found').removeClass('bne-csearch-notfound'); 26 firstElement.scrollIntoView({behavior: 'smooth'}); 27 28 } 29 else { 30 $('.bne-csearch-result').text('Keine Suchtreffer'); 31 $('.bne-csearch-result').removeClass('bne-csearch-found').addClass('bne-csearch-notfound'); 32 } 33 } 34 else { 35 $('.bne-csearch-result').text(''); 36 } 37} 38 39/* 40 Wird nicht mehr verwendet 41jQuery(document).ready(function($){ 42 if ($('section.bne-hero-mitglieder').length > 0) { 43 $('#brx-content').children('.brxe-section').eq(1).find('.brxe-container h2').after('<div class="bne-csearch"><input type="text" class="bne-csearch-text" placeholder="Suche..."><button class="bne-csearch-btn btn--action">Suche</button><div class="bne-csearch-result"></div></div>'); 44 $('.bne-csearch-btn').on('click', function(ev){ 45 bneSearchDocuments($); 46 }); 47 $('.bne-csearch-text').on('keypress', function(ev){ 48 if(ev.which == 13) { 49 bneSearchDocuments($); 50 } 51 }); 52 } 53}); 54*/
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.