Skip to content

Commit

Permalink
fixed an issue with the gifs
Browse files Browse the repository at this point in the history
  • Loading branch information
ION606 committed Jun 23, 2023
1 parent 288bf4b commit ac09b93
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 3 deletions.
Binary file added client/assets/exit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion client/assets/exit.svg

This file was deleted.

Binary file added client/assets/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion client/assets/settings.svg

This file was deleted.

1 change: 1 addition & 0 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<script src="/scripts/images.js"></script>
<script src="/scripts/playNotification.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" crossorigin="anonymous" />
<script src="https://kit.fontawesome.com/728e740903.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/js/all.min.js" integrity="sha512-F5QTlBqZlvuBEs9LQPqc1iZv2UMxcVXezbHzomzS6Df4MZMClge/8+gXrKw2fl5ysdk4rWjR0vKS7NNkfymaBQ==" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700,700i&display=swap">
<title>proto-chat</title>
Expand Down
5 changes: 4 additions & 1 deletion client/scripts/gifs.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ function createGifCollectionDisplay(resultContainer, url) {
if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
const response = JSON.parse(xmlHttp.responseText);

resultContainer.dataset.next = response.next;
for (const i in response.results) {
resultContainer.appendChild(createGifForPopup(response.results[i]));
}
Expand All @@ -190,10 +191,12 @@ function createGifCollectionDisplay(resultContainer, url) {
for (const i in response.results) {
resultContainer.appendChild(createGifForPopup(response.results[i]));
}

resultContainer.dataset.next = response.next;
}
};

getNewGIFsReq.open("GET", url, true);
getNewGIFsReq.open("GET", `${url}&pos=${resultContainer.dataset.next}`, true);
getNewGIFsReq.send(null);
}
});
Expand Down

0 comments on commit ac09b93

Please sign in to comment.