1$(function() { 2 3 function highlightRare() { 4 console.log('rare!'); 5 6 $('mark.rare-highlight').each(function() { 7 $(this).css({ background: '' }).removeClass('rare-highlight'); 8 }); 9 10 var color = $('#rare-colors').val(); 11 var rules = $('#rare-options').val(); 12 13 if (color != '' && rules != '') { 14 console.log('r', color, rules); 15 var threshold = parseInt(rules); 16 17 $('mark').each(function() { 18 var w = $(this); 19 var l = bible.utility.parseLang(w.attr('lang')); 20 var f = l['fr']; 21 if (typeof f != 'undefined') { 22 if (parseInt(f) <= threshold) { 23 w.addClass('rare-highlight').css({ background: color }); 24 } 25 } 26 }); 27 } 28 29 } 30 $('#rare-options, #rare-colors').change(highlightRare); 31 32 function highlightNouns() { 33 console.log('nouns!'); 34 35 $('mark.noun-highlight').each(function() { 36 $(this).css({ background: '' }).removeClass('noun-highlight'); 37 }); 38 39 var color = $('#noun-colors').val(); 40 var rules = $('#noun-options').val(); 41 42 if (color != '' && rules != '') { 43 console.log('n', color, rules); 44 45 $('mark[lang*=mo:' + rules + ']').each(function() { 46 $(this).addClass('noun-highlight').css({ background: color }); 47 }); 48 } 49 50 } 51 $('#noun-options, #noun-colors').change(highlightNouns); 52 53 function highlightVerbs() { 54 console.log('verbs!'); 55 56 $('mark.verb-highlight').each(function() { 57 $(this).css({ background: '' }).removeClass('verb-highlight'); 58 }); 59 60 var color = $('#verb-colors').val(); 61 var rules = $('#verb-options').val(); 62 63 if (color != '' && rules != '') { 64 console.log('v', color, rules); 65 66 $('mark[lang*=mo:' + rules + ']').each(function() { 67 $(this).addClass('verb-highlight').css({ background: color }); 68 }); 69 } 70 71 } 72 $('#verb-options, #verb-colors').change(highlightVerbs); 73 74 window.buildHighlights = function() { 75 highlightVerbs(); 76 highlightNouns(); 77 highlightRare(); 78 } 79 80});
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.