File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,10 @@ async function afterSignIn(user) {
102102      const  url  =  new  URL ( userData . currentGameUrl ) 
103103      const  gameId  =  url . pathname . slice ( 1 ) ; 
104104      document . getElementById ( "userGame" ) . src  =  `https://lichess.org/embed/${ gameId }  ?theme=auto&bg=auto&move=last` ; 
105+ 
106+       if  ( ! checkIfFirstMove ( gameId ) )  { 
107+       document . getElementById ( "reportButton" ) . style . display  =  "block" ; 
108+       }  // display report button only if match hasn't started 
105109    } 
106110
107111    loadLeaderboard ( ) ; 
Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ <h1>Welcome to the Year 8 Chess Tournament</h1>
2424
2525    < div  id ="game-panel " style ="display:none; text-align: center; "> 
2626      < h2 > Your Current Game</ h2 > 
27-       < a  id ="game-link " href ="# " target ="_blank "> Join Game</ a > < br > < br > 
27+       < a  id ="game-link " href ="# " target ="_blank "> < button > Join Game</ button > </ a > < br > < br > 
2828      < div  class ="iframe-wrapper "> 
2929        < div  class ="iframe-loader "> </ div > 
3030        < iframe  id ="userGame " src ="" onload ="hideIframeLoader(this) "> </ iframe > 
3131      </ div >       
3232      < br > 
33-       < button  onclick ="reportTroll() "> Report Opponent</ button > 
33+       < button  id =" reportButton "  style =" display:none; "  onclick ="reportTroll() "> Report Opponent</ button > 
3434    </ div >   
3535
3636    < h2 > Leaderboard</ h2 > 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments