Add DS_STORE to gitignore

This commit is contained in:
Mathias DUPEUX 2024-10-11 21:08:51 +02:00
parent 0e8b3523b8
commit 01c34c6729
3 changed files with 2 additions and 33 deletions

3
.gitignore vendored
View file

@ -1,3 +1,4 @@
__pycache__/
.vscode/
.venv
.venv
.DS_Store

BIN
static/.DS_Store vendored

Binary file not shown.

View file

@ -1,32 +0,0 @@
var isLoading = false;
var page = 1;
function fetchCinemaSessions() {
if (isLoading) return;
isLoading = true;
var loadingContainer = document.getElementById('loading-container');
loadingContainer.innerHTML = '<img src="{{ url_for("static", filename="loading.gif") }}" alt="Loading...">';
fetch('/?page=' + page)
.then(function(response) {
return response.text();
})
.then(function(html) {
var cinemaContainer = document.getElementById('cinema-container');
cinemaContainer.insertAdjacentHTML('beforeend', html);
isLoading = false;
page += 1;
})
.catch(function() {
isLoading = false;
});
}
window.addEventListener('scroll', function() {
if (window.innerHeight + window.scrollY >= document.body.offsetHeight - 100 && !isLoading) {
fetchCinemaSessions();
}
});
fetchCinemaSessions();