towards njp.ma

This commit is contained in:
j 2021-11-12 10:21:00 +00:00
commit b24ba91bfc
23 changed files with 167 additions and 524 deletions

View file

@ -24,10 +24,22 @@ function selectChanged() {
})
}
document.getElementById('sort-select').addEventListener('change', selectChanged)
//document.getElementById('sort-select').addEventListener('change', selectChanged)
const locationHash = location.hash.replace('#', '')
if (locationHash !== '') {
document.getElementById('sort-select').value = locationHash
selectChanged()
}
}
document.querySelectorAll('.films .film figure').forEach(figure => {
var imgs = figure.querySelectorAll('img')
if (imgs.length > 1) {
console.log('needs updates', figure)
setInterval(() => {
var img = figure.querySelector('img')
img.parentElement.appendChild(img)
console.log('change img', img, figure.querySelector('img'))
}, 5000)
}
})