PageSourceSearch

https://www.iwebdatascraping.com/store/js/main.js

js iwebdatascraping.com collected 2026-10-08 03:29:22 UTC 10,834 bytes, 376 lines download raw bytes

1// ============================== header ========================
2
3const header = document.querySelector('header');
4const navItems = header.querySelectorAll('li');
5let previousItem = null;
6// Get the position of the header
7// const headerPosition = header.getBoundingClientRect().top;
8
9
10navItems.forEach((item) => {
11  item.addEventListener('click', () => {
12    navItems.forEach((navItem) => {
13      if (navItem !== item) {
14        navItem.classList.remove('open-dropdown');
15      }
16    });
17    item.classList.toggle('open-dropdown');
18    previousItem = item;
19  });
20
21});
22
23
24// ================= menu ==================
25
26window.addEventListener('load', function () {
27  const menuBtn = document.getElementById('hamburger-menu');
28  const mobileMenu = document.getElementById('navbar-mega-menu');
29
30  menuBtn.addEventListener('click', function () {
31    menuBtn.classList.toggle('active-icon');
32    mobileMenu.classList.toggle('mega-menu-show');
33  });
34});
35
36
37var swiper = new Swiper(".swiper", {
38  slidesPerView: 5,
39  breakpoints: {
40    0: {
41      slidesPerView: 1,
42    },
43    500: {
44      slidesPerView: 2,
45    },
46    768: {
47      slidesPerView: 3,
48    },
49    992: {
50      slidesPerView: 4,
51    },
52    1200: {
53      slidesPerView: 5,
54    }
55  },
56  slidesPerGroup: 1,
57  loop: true,
58  loopFillGroupWithBlank: true,
59  clickable: true,
60
61  // pagination: {
62  //   el: ".swiper-pagination",
63  //   clickable: true,
64  // },
65
66  navigation: {
67    nextEl: ".swiper-button-next",
68    prevEl: ".swiper-button-prev",
69  },
70});
71
72var swiper = new Swiper(".mySwiper.testimonialslider", {
73  rewind: true,
74  spaceBetween: 30,
75  breakpoints: {
76    0: {
77      slidesPerView: 1,
78    },
79    500: {
80      slidesPerView: 1,
81    },
82    768: {
83      slidesPerView: 1,
84    },
85    992: {
86      slidesPerView: 2,
87    },
88    1200: {
89      slidesPerView: 3,
90    }
91  },
92  slidesPerGroup: 1,
93  loop: true,
94  loopFillGroupWithBlank: true,
95  clickable: true,
96});
97
98// =============================== ecommerce website scraper ==================================
99
100$(document).ready(function () {
101  $('#searchecom').keyup(function () {
102    var text = $(this).val().toLowerCase();
103    $('.col-lg-3').hide();
104    $('.col-lg-3').each(function () {
105
106      if ($(this).text().toLowerCase().indexOf("" + text + "") != -1) {
107        $(this).closest('.col-lg-3').show();
108
109      }
110    });
111  });
112});
113
114
115
116// =============================== website api ==================================
117
118
119
120$(document).ready(function () {
121  $("#search").on("keyup", function () {
122    // $('#search-box').show();
123    var value = $(this).val().toLowerCase();
124    var results = [];
125
126    $("#mytabcontent .company-list a").each(function () {
127      if ($(this).text().toLowerCase().indexOf(value) != -1) {
128        results.push("<a href='" + $(this).attr("href") + "'>" + $(this).text() + "</a>");
129      }
130    });
131
132
133    if (results.length > 0 || value.length === 0) {
134      $("#search-box").html(results.join("<br>")).toggle(value.length !== 0);
135    } else {
136      $("#search-box").hide();
137    }
138  });
139});
140
141// =============================== industey page ==================================
142
143$(function () {
144  $('#dataset-search').keyup(function () {
145    var text = $(this).val().toLowerCase();
146    $('.data-search').hide();
147    $('.data-search').each(function () {
148      if ($(this).text().toLowerCase().indexOf("" + text + "") != -1) {
149        $(this).closest('.data-search').show();
150      }
151    });
152  });
153});
154
155
156
157// -------------------------------- new styling for included blog, case study, report ----------------
158
159window.onload = function () {
160  const tabButtons = document.querySelectorAll(".tab-btn");
161  const tabContentsNew = document.querySelectorAll(".tab-content-new");
162
163  function switchTab(tabId) {
164    tabContentsNew.forEach((tabContent) => {
165      tabContent.style.display = "none";
166    });
167
168    tabButtons.forEach((tabBtn) => {
169      tabBtn.classList.remove("active");
170    });
171
172    const tabToShow = document.getElementById(tabId);
173    if (tabToShow) {
174      tabToShow.style.display = "flex";
175    }
176
177    const activeButton = document.querySelector(`[data-tab='${tabId}']`);
178    if (activeButton) {
179      activeButton.classList.add("active");
180    }
181  }
182
183  tabButtons.forEach((tabBtn) => {
184    tabBtn.addEventListener("click", () => {
185      const tabId = tabBtn.getAttribute("data-tab");
186      switchTab(tabId);
187    });
188  });
189
190  switchTab("tab1");
191
192  // -------------------------------- new index page tabs ----------------
193
194  const indexTabButtons = document.querySelectorAll(".index-tab-btn");
195  const IndexTabContents = document.querySelectorAll(".index-tab-content");
196
197  function switchTabIndex(indextabId) {
198    IndexTabContents.forEach((indextabContent) => {
199      indextabContent.style.display = "none";
200    });
201
202    indexTabButtons.forEach((indextabBtn) => {
203      indextabBtn.classList.remove("active");
204    });
205
206    const indexTabToShow = document.getElementById(indextabId);
207    if (indexTabToShow) {
208      indexTabToShow.style.display = "flex";
209    }
210
211    const indexActiveButton = document.querySelector(`[data-tab-index='${indextabId}']`);
212    if (indexActiveButton) {
213      indexActiveButton.classList.add("active");
214    }
215  }
216
217  indexTabButtons.forEach((indextabBtn) => {
218    indextabBtn.addEventListener("click", () => {
219      const indextabId = indextabBtn.getAttribute("data-tab-index");
220      switchTabIndex(indextabId);
221    });
222  });
223
224  switchTabIndex("indextab1");
225
226};
227
228// =================================== web scraper tab list ==============================================
229document.addEventListener('DOMContentLoaded', function() {
230
231    const categoryButtons = document.querySelectorAll('.category-button');
232    const categoryList = document.querySelector('.category-list');
233    const categoryItems = document.querySelectorAll('.a-search');
234    const navTabs = document.querySelector('.nav-tabs-alphabet');
235    let currentCategory = 'viewall';
236
237    // Store the original HTML content
238    if(categoryList){
239        const originalCategoryData = categoryList.innerHTML;
240        
241        // Function to show the nav-tabs list
242        function showNavTabs() {
243        navTabs.style.display = 'flex';
244        }
245        
246        // Function to hide the nav-tabs list
247        function hideNavTabs() {
248        navTabs.style.display = 'none';
249        }
250        
251        // Function to add the category-list-wrap class
252        function addCategoryListWrap() {
253        categoryList.classList.add('category-list-wrap');
254        }
255        
256        // Function to remove the category-list-wrap class
257        function removeCategoryListWrap() {
258        categoryList.classList.remove('category-list-wrap');
259        }
260        
261        // // Add an event listener to .nav-link-chnage elements
262        document.querySelectorAll('.nav-link-chnage').forEach(link => {
263        link.addEventListener('click', (event) => {
264            event.preventDefault();
265        
266            // Load and display the category-list without changes
267            categoryList.innerHTML = originalCategoryData;
268        
269            // Remove the 'active' class from all links and add it to the clicked link
270            document.querySelectorAll('.nav-link-chnage').forEach(navLink => navLink.classList.remove('active'));
271            link.classList.add('active');
272        });
273        });
274    
275        categoryButtons.forEach(button => {
276        button.addEventListener('click', () => {
277            const targetCategory = button.getAttribute('data-target');
278        
279            if (targetCategory === 'viewall') {
280            showAllCategories();
281            showNavTabs(); // Show the nav-tabs when "View All" is clicked
282        
283            // Remove the category-list-wrap class
284            removeCategoryListWrap();
285            } else {
286            showCategory(targetCategory);
287            currentCategory = targetCategory;
288            hideNavTabs(); // Hide the nav-tabs for other category buttons
289        
290            // Add the category-list-wrap class
291            addCategoryListWrap();
292            }
293        
294            // Remove the 'active' class from all buttons and add it to the clicked button
295            categoryButtons.forEach(btn => btn.classList.remove('active'));
296            button.classList.add('active');
297        
298            // Scroll to the api-services section with the top at 0 position from the window top
299            const apiServicesSection = document.querySelector('.api-services');
300            if (apiServicesSection) {
301            apiServicesSection.scrollIntoView({
302                behavior: 'smooth',
303                block: 'start',
304                inline: 'nearest'
305            });
306            }
307        });
308        });
309        
310        function showCategory(category) {
311        let filteredCategoryData = '';
312        
313        categoryItems.forEach(item => {
314            const dataCategory = item.getAttribute('data-category');
315            if (dataCategory === category) {
316            filteredCategoryData += item.outerHTML;
317            }
318        });
319        
320        categoryList.innerHTML = filteredCategoryData;
321        }
322        
323        function showAllCategories() {
324        // Restore the original HTML content
325        categoryList.innerHTML = originalCategoryData;
326        }
327        
328        // Initially, show the nav-tabs list when the page loads
329        showNavTabs();
330        showAllCategories();
331        
332    }
333});
334
335
336
337$(document).ready(function () {
338  $('#searchQueryInput').keyup(function () {
339    var text = $(this).val().toLowerCase();
340    $('.product-type').hide();
341    $('.product-type').each(function () {
342
343      if ($(this).text().toLowerCase().indexOf("" + text + "") != -1) {
344        $(this).closest('.product-type').show();
345
346      }
347    });
348  });
349});
350
351// ====================================================================
352
353
354// let slideIndex = 0;
355// showSlides();
356
357// function showSlides() {
358//   let i;
359//   let slides = document.getElementsByClassName("slide-col");
360//   let dots = document.getElementsByClassName("btnt");
361//   for (i = 0; i < slides.length; i++) {
362//     slides[i].style.display = "none";
363//   }
364//   slideIndex++;
365//   if (slideIndex > slides.length) { slideIndex = 1 }
366//   for (i = 0; i < dots.length; i++) {
367//     dots[i].className = dots[i].className.replace(" open", "");
368//   }
369//   slides[slideIndex - 1].style.display = "block";
370//   dots[slideIndex - 1].className += " open";
371//   setTimeout(showSlides, 2000); // Change image every 2 seconds
372// }
373
374
375
376

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.