1class ProductReviewHomepage { 2 3 constructor() { 4 this.selector = '#modules-product-review-homepage'; 5 this.initShowAll(); 6 this.initShowAllContent(); 7 } 8 9 initShowAll() { 10 11 var toto = this; 12 13 if ($(this.selector).find('.show-more-btn').length) { 14 $(this.selector).find('.show-more-btn').on('click', function () { 15 $(this).hide(); 16 $(toto.selector).find('.item.hidden').show(); 17 }); 18 } 19 20 } 21 22 initShowAllContent() { 23 if ($(this.selector).find('.item .content p').length) { 24 $(this.selector).find('.item .content p').each(function () { 25 var text = $(this).text(); 26 var divider = 130; 27 if (text.length > divider) { 28 $(this).html(text.slice(0, divider) + '<span class="dots">... </span><span class="additional">' + text.slice(divider, text.length) + '</span>'); 29 $(this).parent().find('.show-more-a').show().on('click', function () { 30 $(this).closest('.content').find('.dots').hide(); 31 $(this).closest('.content').find('.additional').show(); 32 $(this).hide(); 33 }); 34 } 35 }); 36 } 37 } 38 39} 40 41nody.modules.ProductReviewHomepage = new ProductReviewHomepage();
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.