Skip to content

Commit 40847b5

Browse files
Update app.js
1 parent 3ae2ca8 commit 40847b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ async function afterSignIn(user) {
9898
gameLink.href = userData.currentGameUrl;
9999
gameLink.innerText = "Join Your Game";
100100
document.getElementById("game-panel").style.display = "block";
101-
document.getElementById("userGame").src = userData.currentGameUrl;
101+
const url = new URL(userData.currentGameUrl)
102+
const gameId = url.pathname.slice(1);
103+
document.getElementById("userGame").src = `https://lichess.org/embed/${gameId}?theme=auto&bg=auto&move=last`;
102104
}
103105

104106
loadMatches();

0 commit comments

Comments
 (0)