move search script

This commit is contained in:
2025-04-12 22:44:53 +04:00
parent 5341f976da
commit 530bb49e37
2 changed files with 27 additions and 28 deletions
+12
View File
@@ -0,0 +1,12 @@
document.addEventListener('DOMContentLoaded', function() {
// Gestion des clics sur les vidéos
const videoCards = document.querySelectorAll('.video-card');
videoCards.forEach(card => {
card.addEventListener('click', function() {
const videoId = this.dataset.videoId;
if (videoId) {
window.location.href = 'video.php?id=' + videoId;
}
});
});
});
+1 -14
View File
@@ -193,19 +193,6 @@ if ($resultsCount > 0) {
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="js/main.js"></script> <script src="js/main.js"></script>
<script> <script src="js/search.js"></script>
document.addEventListener('DOMContentLoaded', function() {
// Gestion des clics sur les vidéos
const videoCards = document.querySelectorAll('.video-card');
videoCards.forEach(card => {
card.addEventListener('click', function() {
const videoId = this.dataset.videoId;
if (videoId) {
window.location.href = 'video.php?id=' + videoId;
}
});
});
});
</script>
</body> </body>
</html> </html>