PageSourceSearch

https://baddaythemovie.co.uk/wp-content/themes/movie-theme/assets/js/main.js?ver=6.9.9

js baddaythemovie.co.uk collected 2026-10-07 06:44:10 UTC 1,778 bytes, 52 lines download raw bytes

1var swiper = new Swiper(".mySlider", {
2    loop: true,
3    autoplay: {
4        delay: 2500, // thời gian giữa các slide (ms)
5        disableOnInteraction: false, // cho phép tiếp tục autoplay khi người dùng tương tác
6    },
7    scrollbar: {
8        el: ".swiper-scrollbar",
9        hide: true,
10    },
11});
12
13// Hàm chuyển đổi số rating thành chuỗi HTML chứa các ảnh sao
14function convertRatingToStars(rating) {
15    const maxStars = 5;
16    let starsHTML = '';
17
18    for (let i = 1; i <= maxStars; i++) {
19        if (i <= rating) {
20            starsHTML += '<i class="icon-star"></i>';
21        } else {
22            starsHTML += '<i class="icon-star-o"></i>';
23        }
24    }
25
26    return starsHTML;
27}
28
29// Lấy tất cả các phần tử có class "rating" và cập nhật HTML theo data-stars
30const ratingElements = document.getElementsByClassName("rating");
31for (let element of ratingElements) {
32    const ratingValue = element.getAttribute("data-stars");
33    if (ratingValue) {
34        // Chuyển chuỗi thành số thập phân
35        let ratingDecimal = parseFloat(ratingValue);
36        // Chuyển số thập phân thành số nguyên (làm tròn)
37        let ratingInteger = Math.round(ratingDecimal);
38        element.innerHTML = convertRatingToStars(ratingInteger);
39    }
40}
41document.addEventListener('DOMContentLoaded', function () {
42    var viewMoreBtn = document.getElementById('view_more');
43    if(viewMoreBtn) {
44        viewMoreBtn.addEventListener('click', function () {
45            var contentDetail = document.querySelector('.content-detail');
46            contentDetail.classList.add('expanded');
47            // Ẩn nút "Xem thêm" sau khi click nếu cần
48            viewMoreBtn.style.display = 'none';
49        });
50    }
51});
52

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.