| <!--script-search.html--> |
| <script> |
| $(function () { |
| var params = new URLSearchParams(window.location.search); |
| var contributor = params.get('contributor'); |
| if(!contributor) { |
| $('.search-tips').text('No data') |
| return; |
| } |
| var lowerCaseContributor = contributor.toLowerCase(); |
| var ele = $("." + lowerCaseContributor) |
| if (ele.length > 0) { |
| var contributorEle = ele.first().clone(); |
| $('.current-contributor').html(contributorEle); |
| $(contributorEle).fadeIn(); |
| ele.show().parents('.item-wrapper').addClass('show'); |
| $.each($('.contributors-wrapper .item-wrapper'), (index, item) => { |
| if (!$(item).hasClass('show')) { |
| $(item).remove(); |
| } |
| }) |
| $('.search-tips').hide(); |
| } else { |
| $('.search-tips').text('No data') |
| } |
| }) |
| </script> |