function copyRoomCode(e){
    const heading = this;
    const code = heading.innerText
    if(code != "Code copied!"){
        copyToClipboard(code);
        heading.innerText = "Code copied!"
        window.setTimeout(function(){
            heading.innerText = code
        }, 1500);
    }
}
// Copy room code when user clicks on it
Copy room code when user clicks on it
Copy room code when user clicks on it
function copyRoomCode(e){
    const heading = this;
    const code = heading.innerText
    if(code != "Code copied!"){
        copyToClipboard(code);
        heading.innerText = "Code copied!"
        window.setTimeout(function(){
            heading.innerText = code
        }, 1500);
    }
}
function copyRoomCode ( e ) { const heading = this ; const code = heading . innerText if ( code != "Code copied!" ) { copyToClipboard ( code ) ; heading . innerText = "Code copied!" window . setTimeout ( function ( ) { heading . innerText = code } , 1500 ) ; } }
Copy room code when user clicks on it
Copy room code when user clicks on it