1 $(document).ready(function() { 2 3 var endTextTitle = "..."; 4 5 /* Si le titre est plus grand que la taille définie, on le réduit et on rajoute 3 points à la suite */ 6 var maxLengthTitle = 130; 7 var maxLengthTitleCut = maxLengthTitle; 8 var string1 = 1; 9 $('.js-cover-title a').each(function() { 10 var text = $(this).text().trim(); 11 if(text.length > maxLengthTitle) { 12 string1 = text.substring(maxLengthTitle-1, maxLengthTitle); 13 maxLengthTitleCut = maxLengthTitle-1; 14 while(string1!==" ") { 15 string1 = text.substring(maxLengthTitleCut-1, maxLengthTitleCut); 16 maxLengthTitleCut = maxLengthTitleCut-1; 17 } 18 var substring = text.substring(0, maxLengthTitleCut); 19 substring = substring.concat(endTextTitle); 20 $(this).html(substring); 21 } 22 }); 23 24 25 26 var endTextAuthor = "et al."; 27 28 /* De même pour les auteurs */ 29 var maxLengthAuthors = 45; 30 $('.js-cover-author p').each(function() { 31 var text = $(this).text().trim(); 32 if(text.length > maxLengthAuthors) { 33 var substring = text.substring(0, maxLengthAuthors); 34 substring = substring.concat(endTextAuthor); 35 $(this).html(substring); 36 } 37 }); 38 39 // Italique sur les mentions "et al." 40 41 $("ref, cite[data-reference]").each(function() { 42 var content = $(this).html(); 43 var newContent = content.replace(/et al\./g, "<em>et al.</em>"); 44 $(this).html(newContent); 45 }); 46 47 });
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.