Hide link in forum until user comment

i want to make a simple code, using HTML CSS Javascipt, that will allow only registered members who left at least one comment to see a specific part of the post. i can’t use php or such, cause it’s on a forum, and we’re only allowed to add on our own only simple scripts. the forum usually use bbcode to create posts and such but we can also write posts using html

i already know the script to hide a part of a post to non-registered memeber, but i want one to make it visible to only member who left a comment

we have this script for Register here to view links and images

<script type="text/javascript" src="http://nb.forumfree.it/scripts/ace/link_guests.js"></script>
<script type="text/javascript">
msgRegLink = "Registrati qui per visualizzare i link e le immagini";
selectSez = ["all","12345"];
hideIMG= false;

Someone gave us a Part of the code not all

commented() {
   if (isShown == false) {
    isShown: true

You have to have some kind of store in your app and then you’ll send inquiry to that store to determine if you can show this user content, like so:

const userComments = store.user ? store.user.getComments(postId) : [];
if (userComments.length) displayContent();

Needless to say that this script on the client would have to be “localized” by IIFE, otherwise I could just run displayContent() from the console :slight_smile:

it’s not app it’s https://nicetesttest.forumcommunity.net