utterances icon indicating copy to clipboard operation
utterances copied to clipboard

Add a load button to comments

Open Meekdai opened this issue 2 years ago • 0 comments

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?

Meekdai avatar Jul 31 '23 09:07 Meekdai