2025-04-12 21:55:09 +04:00
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
2026-01-15 19:38:55 +04:00
|
|
|
// Gestion des clics sur les vidéos initiales de la page catégorie
|
|
|
|
|
// Note: Le bouton "Voir Plus" est géré par main.js via data-category-id
|
2025-04-12 21:55:09 +04:00
|
|
|
const videoCards = document.querySelectorAll(".video-card");
|
|
|
|
|
|
|
|
|
|
for (const videoCard of videoCards) {
|
2026-01-15 19:38:55 +04:00
|
|
|
if (!videoCard.hasAttribute("data-click-initialized")) {
|
|
|
|
|
videoCard.setAttribute("data-click-initialized", "true");
|
|
|
|
|
videoCard.addEventListener("click", function () {
|
|
|
|
|
const videoId = this.dataset.videoId;
|
|
|
|
|
if (videoId) {
|
|
|
|
|
window.location.href = `video.php?id=${videoId}`;
|
2025-04-12 21:55:09 +04:00
|
|
|
}
|
2026-01-15 19:38:55 +04:00
|
|
|
});
|
|
|
|
|
}
|
2025-04-12 21:55:09 +04:00
|
|
|
}
|
|
|
|
|
});
|