PageSourceSearch

https://bdadsnetwork.com/themes/cherry-red/js/main.js

js bdadsnetwork.com collected 2026-10-08 13:38:59 UTC 4,151 bytes, 180 lines download raw bytes

1(function() {
2  "use strict";
3
4  /**
5   * Easy selector helper function
6   */
7  const select = (el, all = false) => {
8    el = el.trim()
9    if (all) {
10      return [...document.querySelectorAll(el)]
11    } else {
12      return document.querySelector(el)
13    }
14  }
15
16  /**
17   * Easy event listener function
18   */
19  const on = (type, el, listener, all = false) => {
20    let selectEl = select(el, all)
21    if (selectEl) {
22      if (all) {
23        selectEl.forEach(e => e.addEventListener(type, listener))
24      } else {
25        selectEl.addEventListener(type, listener)
26      }
27    }
28  }
29
30  /**
31   * Easy on scroll event listener
32   */
33  const onscroll = (el, listener) => {
34    el.addEventListener('scroll', listener)
35  }
36
37  /**
38   * Toggle .header-scrolled class to .header-class when page is scrolled
39   */
40  let selectHeader = select('.header-class')
41  if (selectHeader) {
42    const headerScrolled = () => {
43      if (window.scrollY > 100) {
44        selectHeader.classList.add('header-scrolled')
45      } else {
46        selectHeader.classList.remove('header-scrolled')
47      }
48    }
49    window.addEventListener('load', headerScrolled)
50    onscroll(document, headerScrolled)
51  }
52
53  /**
54   * Back to top button
55   */
56  let backtotop = select('.back-to-top')
57  if (backtotop) {
58    const toggleBacktotop = () => {
59      if (window.scrollY > 100) {
60        backtotop.classList.add('active')
61      } else {
62        backtotop.classList.remove('active')
63      }
64    }
65    window.addEventListener('load', toggleBacktotop)
66    onscroll(document, toggleBacktotop)
67  }
68
69
70  /**
71   * Mobile nav toggle
72   */
73  on('click', '.mobile-nav-toggle', function(e) {
74    select('#navbar').classList.toggle('navbar-mobile')
75    this.classList.toggle('fa-bars')
76    this.classList.toggle('fa-times')
77  })
78
79  /**
80   * Mobile nav dropdowns activate
81   */
82  on('click', '.navbar .dropdown > a', function(e) {
83    if (select('#navbar').classList.contains('navbar-mobile')) {
84      e.preventDefault()
85      this.nextElementSibling.classList.toggle('dropdown-active')
86    }
87  }, true)
88
89
90/**
91   * Testimonials slider
92   */
93if($('.slides-1').length > 0)
94{
95  new Swiper('.slides-1', {
96    speed: 600,
97    loop: true,
98    autoplay: {
99      delay: 5000,
100      disableOnInteraction: false
101    },
102    slidesPerView: 'auto',
103    pagination: {
104      el: '.swiper-pagination',
105      type: 'bullets',
106      clickable: true
107    },
108    navigation: {
109      nextEl: '.swiper-button-next',
110      prevEl: '.swiper-button-prev',
111    }
112  });
113}
114
115
116    $("#dashboard-side-menu-icon").click(function(){
117
118        if($(".dashboard-side-menu-temp").length == 0)
119        {
120            $("#dashboard-side-menu").addClass("dashboard-side-menu-temp");
121            $(".content-section").addClass("content-section-menu-hide");
122        }
123        else
124        {
125            $("#dashboard-side-menu").removeClass("dashboard-side-menu-temp");
126            $(".content-section").removeClass("content-section-menu-hide");
127        }
128
129    });
130
131
132
133
134    if($('.dashboard-side-menu .sidebar').length > 0)
135    {
136	    $('.dashboard-side-menu .sidebar').mCustomScrollbar({
137	            axis:"y",
138	    });
139    }
140
141
142/**
143 * Animation on scroll
144 */
145 if(!(typeof AOS  == 'undefined'))
146 {
147     window.addEventListener('load', () => {
148       AOS.init({
149         duration: 1000,
150         easing: 'ease-in-out',
151         once: true,
152         mirror: false
153       })
154     });
155 }
156
157
158function heightAdjustment(operation)
159{
160    var contentSectionHeight = $(".content-section").outerHeight();
161
162		var headerSectionHeight  = 100;
163		var footerSectionHeight  = $(".footer-class").outerHeight();
164
165		var screenHeight         = $(window).height();
166		var pageContentHeight    = screenHeight - headerSectionHeight - footerSectionHeight;
167
168		$(".content-section").css("min-height", pageContentHeight+"px");
169}
170
171if($(".content-section").length > 0)
172heightAdjustment();
173
174$(window).resize(function()
175{
176      if($(".content-section").length > 0)
177      heightAdjustment();
178});
179
180})();

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.