blob: 9d774d0eac5c31c8b44d895e57bcf25bf7f71f21 [file] [log] [blame]
<!--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>