PageSourceSearch

https://bigportal.ba/wp-content/themes/bigportal/js/app.js?ver=1.0.0

js bigportal.ba collected 2026-10-02 11:37:03 UTC 5,981 bytes, 178 lines download raw bytes

1/*Swiper slider radio icons*/
2var swiper = new Swiper(".mySwiper", {
3    autoplay: {
4        delay: 2000,
5        disableOnInteraction: false,
6    },
7    forceLoop: true,
8    breakpoints: {
9        360: {
10            slidesPerView: 4,
11            spaceBetween: 10
12        },
13        940: {
14            slidesPerView: 5,
15            spaceBetween: 10
16        }
17    },
18});
19
20// Swiper for bigBizz section
21var bigBizzSwiper = new Swiper(".bigBizzSwiper", {
22    autoplay: {
23        delay: 2500,
24        disableOnInteraction: false,
25    },
26    loop: true,
27    breakpoints: {
28        360: {
29            slidesPerView: 1.5,
30            spaceBetween: 10
31        },
32        960: {
33            slidesPerView: 4,
34            spaceBetween: 40
35        }
36    },
37});
38
39/*Radio*/
40
41let x = document.getElementById("my-radio");
42
43const radioButton = document.querySelector('.radio-button');
44
45const boxOne = document.querySelector('.box-1');
46const boxTwo = document.querySelector('.box-2');
47const boxThree = document.querySelector('.box-3');
48const boxFour = document.querySelector('.box-4');
49const boxFive = document.querySelector('.box-5');
50
51
52function toggleAudio() {
53    if (x.paused) {
54        x.play();
55        radioButton.classList.add('active');
56        boxOne.classList.add('box1');
57        boxTwo.classList.add('box2');
58        boxThree.classList.add('box3');
59        boxFour.classList.add('box4');
60        boxFive.classList.add('box5');
61    } else {
62        x.pause();
63        radioButton.classList.remove('active');
64        boxOne.classList.remove('box1');
65        boxTwo.classList.remove('box2');
66        boxThree.classList.remove('box3');
67        boxFour.classList.remove('box4');
68        boxFive.classList.remove('box5');
69    }
70}
71
72document.addEventListener('DOMContentLoaded', (event) => {
73    const elements = document.querySelectorAll('.footer-category-links');
74    elements.forEach((element) => {
75        element.addEventListener('click', function () {
76            if (window.innerWidth <= 1024) {
77                this.classList.toggle('expanded');
78            }
79        });
80    });
81
82    var frekvencijeModal = document.querySelectorAll('.frekvencije-modal');
83    frekvencijeModal.forEach(function (element) {
84        element.addEventListener('click', function () {
85            var tableContent = document.getElementById('table-content');
86            if (tableContent.style.display === "none" || tableContent.style.display === "") {
87                tableContent.style.display = "block";
88            } else {
89                tableContent.style.display = "none";
90            }
91        });
92    });
93});
94
95//Back to top arrow
96
97document.addEventListener("DOMContentLoaded", () => {
98    const backToTopButton = document.querySelector('.back-to-top');
99
100    // Show or hide the button based on scroll position
101    window.addEventListener("scroll", () => {
102        if (window.scrollY > 2000 && window.innerWidth < 768) {
103            backToTopButton.style.display = 'block';
104        } else if (window.scrollY > 1000 && window.innerWidth >= 768) {
105            backToTopButton.style.display = 'block';
106        } else {
107            backToTopButton.style.display = 'none';
108        }
109    });
110
111    // Scroll to the top when the button is clicked
112    backToTopButton.addEventListener("click", () => {
113        window.scrollTo({ top: 0, behavior: "smooth" });
114    });
115});
116
117document.addEventListener("DOMContentLoaded", function () {
118    // Fetch data from WP REST API for KRIPTO.ba and other
119    function fetchPosts(apiUrl, mainPostContainerId, otherPostsContainerId) {
120    const mainPostContainer = document.querySelector(mainPostContainerId);
121    const otherPostsContainer = document.querySelector(otherPostsContainerId);
122
123    // Bail out early if containers aren't on this page
124    if (!mainPostContainer || !otherPostsContainer) {
125        return;
126    }
127
128    fetch(apiUrl + "?per_page=5&_embed=true")
129        .then(response => response.json())
130        .then(data => {
131            const mainPost = data[0];
132            mainPostContainer.innerHTML = `
133                <div>
134                    <a href="${mainPost.link}">
135                        <img src="${mainPost._embedded['wp:featuredmedia'][0].source_url}" alt="${mainPost.title.rendered}">
136                    </a>
137                </div>
138                <h5>
139                    <a href="${mainPost.link}">${mainPost.title.rendered}</a>
140                </h5>
141            `;
142
143            const otherPostsHtml = data.slice(1).map(post => `
144                <div class="male-vijesti">
145                    <div class="card-male-vijesti">
146                        <div>
147                            <a href="${post.link}">
148                                <img src="${post._embedded['wp:featuredmedia'][0].source_url}" alt="${post.title.rendered}">
149                            </a>
150                        </div>
151                        <div>
152                            <h5>
153                                <a href="${post.link}">${post.title.rendered}</a>
154                            </h5>
155                        </div>
156                    </div>
157                </div>
158                <hr>
159            `).join('');
160            otherPostsContainer.innerHTML = otherPostsHtml;
161        })
162        .catch(error => console.error("Error fetching posts:", error));
163}
164
165    // Use the fetchPosts function for both columns
166    fetchPosts("https://kripto.ba/wp-json/wp/v2/posts", "#main-post", "#other-posts");
167    fetchPosts("https://bigsolar.ba/wp-json/wp/v2/posts", "#solar-main-post", "#solar-other-posts");
168});
169
170//Link copy from the post
171function copyPageURL() {
172    navigator.clipboard.writeText(window.location.href).then(function () {
173        alert('Link je kopiran!');
174    })
175        .catch(function (error) {
176            alert('Nemoguće kopirati link!: ', error);
177        });
178}

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.