let publicInformationBadge = document.querySelector('#public-information-badge'); if ("{{ user.id }}" == "{{ current_user.hashid }}") { if ("{{ user.is_public }}" == "True") { publicInformationBadge.dataset.badgeCaption = 'Your profile is public'; publicInformationBadge.classList.add('green'); publicInformationBadge.classList.remove('red'); } else { publicInformationBadge.dataset.badgeCaption = 'Your profile is private'; publicInformationBadge.classList.add('red'); publicInformationBadge.classList.remove('green'); } } else { publicInformationBadge.remove(); } let followedCorpusList = new FollowedCorpusList(document.querySelector('.followed-corpus-list')); followedCorpusList.add({{ followed_corpora|tojson }}); let publicCorpusList = new PublicCorpusList(document.querySelector('.public-corpus-list')); publicCorpusList.add({{ own_public_corpora|tojson }});