Ensuring extra links deletion.

This commit is contained in:
Sergiotarxz 2023-11-29 16:54:49 +01:00
parent c7bf18b4f9
commit b18a6b5c57
2 changed files with 5 additions and 1 deletions

View File

@ -103,6 +103,7 @@ export default class CarouselAd {
return;
}
const aPrev = this.retrieveLinkCarousel()
const allAnchors = carousel.querySelectorAll('a')
const a = document.createElement('a')
a.addEventListener('click', (event: MouseEvent) => {
event.preventDefault()
@ -142,6 +143,9 @@ export default class CarouselAd {
aPrev.classList.add('remove')
window.setTimeout(() => {
aPrev.remove()
for (const a of allAnchors) {
a.remove()
}
}, 1000)
}
}, 10)

File diff suppressed because one or more lines are too long