Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a load button to comments #657

Open
Meekdai opened this issue Jul 31, 2023 · 0 comments
Open

Add a load button to comments #657

Meekdai opened this issue Jul 31, 2023 · 0 comments

Comments

@Meekdai
Copy link

Meekdai commented Jul 31, 2023

Hello, I want to add a button to the comment and load utterances after the user clicks.
I use setInterval to check the utterances height, when height!="" is means utterances Loading completed. Demo

int=self.setInterval("iFrameLoading()",200);

function iFrameLoading(){
    var utterances=document.getElementsByClassName('utterances');
    if(utterances.length==1){
        if(utterances[0].style.height!=""){
            int=window.clearInterval(int);
            console.log("utterances Load OK");
        }
    }
}

Is there a better way to achieve this functionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant