commit
cda703bfae
|
@ -61,4 +61,8 @@ h2 {
|
|||
|
||||
#link_div > a:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
img.emoji {
|
||||
height: 14px;
|
||||
}
|
|
@ -7,7 +7,6 @@ $(document).ready(function (){
|
|||
});
|
||||
|
||||
socket.on("states_update", function (json) { //json is an object containing all game updates
|
||||
console.log(json)
|
||||
var searchparams = new URLSearchParams(window.location.search);
|
||||
var exists = false;
|
||||
for (game of json) {
|
||||
|
@ -17,7 +16,10 @@ $(document).ready(function (){
|
|||
}
|
||||
}
|
||||
if (!exists) {
|
||||
// inform the user the game has ended
|
||||
$('game').remove()
|
||||
$('#game_container').text("The game you're looking for either doesn't exist or has already ended.")
|
||||
}
|
||||
|
||||
twemoji.parse(document.body);
|
||||
});
|
||||
});
|
|
@ -89,9 +89,10 @@ const insertEmpty = (grid) => {
|
|||
|
||||
const insertGame = (gridboxnum, game) => {
|
||||
var thisBox = grid.children[gridboxnum];
|
||||
thisBox.innerHTML = game.html;
|
||||
thisBox.className = "game";
|
||||
thisBox.timestamp = game.timestamp;
|
||||
thisBox.innerHTML = game.html;
|
||||
twemoji.parse(thisBox);
|
||||
};
|
||||
|
||||
const insertLeague = (league) => {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<html lang="en-US">
|
||||
<head>
|
||||
<script src="//code.jquery.com/jquery-3.5.1.min.js"></script>
|
||||
<script src="https://twemoji.maxcdn.com/v/latest/twemoji.min.js" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/3.0.4/socket.io.js"></script>
|
||||
<script type="text/javascript" async src="https://platform.twitter.com/widgets.js"></script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user