PageSourceSearch

https://www.foot-parier.com/wp-content/themes/covernews/assets/script.js?ver=6.3.12

js foot-parier.com collected 2026-10-03 01:36:41 UTC 16,378 bytes, 447 lines download raw bytes

1(function (e) {
2    "use strict";
3    var n = window.AFTHRAMPES_JS || {};
4    n.stickyMenu = function () {
5        e(window).scrollTop() > 350 ? e("#masthead").addClass("nav-affix") : e("#masthead").removeClass("nav-affix")
6    },
7        n.mobileMenu = {
8            init: function () {
9                this.toggleMenu(), this.menuMobile(), this.menuArrow()
10
11            },
12            toggleMenu: function () {
13                e('#masthead').on('click', '.toggle-menu', function (event) {
14                    var ethis = e('.main-navigation .menu .menu-mobile');
15                    if (ethis.css('display') == 'block') {
16                        ethis.slideUp('300');
17                    } else {
18                        ethis.slideDown('300');
19                    }
20                    e('.ham').toggleClass('exit');
21                    e('body.aft-sticky-header').toggleClass('aft-sticky-header-revealed');
22                });
23                e('#masthead .main-navigation ').on('click', '.menu-mobile a button', function (event) {
24                    event.preventDefault();
25                    var ethis = e(this),
26                        eparent = ethis.closest('li'),
27                        esub_menu = eparent.find('> .sub-menu');
28                    if (esub_menu.css('display') == 'none') {
29                        esub_menu.slideDown('300');
30                        ethis.addClass('active');
31                    } else {
32                        esub_menu.slideUp('300');
33                        ethis.removeClass('active');
34                    }
35                    return false;
36                });
37            },
38            menuMobile: function () {
39                if (e('.main-navigation .menu > ul').length) {
40                    var ethis = e('.main-navigation .menu > ul'),
41                        eparent = ethis.closest('.main-navigation'),
42                        pointbreak = eparent.data('epointbreak'),
43                        window_width = window.innerWidth;
44                    if (typeof pointbreak == 'undefined') {
45                        pointbreak = 991;
46                    }
47                    if (pointbreak >= window_width) {
48                        ethis.addClass('menu-mobile').removeClass('menu-desktop');
49                        e('.main-navigation .toggle-menu').css('display', 'block');
50                        e('.main-navigation-container-items-wrapper').addClass('aft-mobile-navigation');
51                    } else {
52                        ethis.addClass('menu-desktop').removeClass('menu-mobile').css('display', '');
53                        e('.main-navigation .toggle-menu').css('display', '');
54                        e('.main-navigation-container-items-wrapper').removeClass('aft-mobile-navigation');
55                    }
56                }
57
58                if (e('.aft-mobile-navigation').length) {
59                    var navElement = document.querySelector(".aft-mobile-navigation");
60                    if(navElement){
61
62                        n.trapFocus(navElement);
63                    }
64                }
65            },
66            menuArrow: function () {
67                if (e('#masthead .main-navigation div.menu > ul').length) {
68                    e('#masthead .main-navigation div.menu > ul .sub-menu').parent('li').find('> a').append('<button class="fa fa-angle-down">');
69                }
70            }
71        },
72
73        n.trapFocus = function(element) {
74
75            var focusableEls = element.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled])'),
76                firstFocusableEl = focusableEls[0],
77                lastFocusableEl = focusableEls[focusableEls.length - 1],
78                KEYCODE_TAB = 9;
79
80            element.addEventListener('keydown', function(e) {
81                var isTabPressed = (e.key === 'Tab' || e.keyCode === KEYCODE_TAB);
82
83                if (!isTabPressed) {
84                    return;
85                }
86
87                if ( e.shiftKey ) /* shift + tab */ {
88                    if (document.activeElement === firstFocusableEl) {
89                        e.preventDefault();
90                        lastFocusableEl.focus();
91                    }
92
93                } else /* tab */ {
94                    if (document.activeElement === lastFocusableEl) {
95                        e.preventDefault();
96                        firstFocusableEl.focus();
97                    }
98
99                }
100
101            });
102
103
104        },
105
106
107        n.DataBackground = function () {
108            var pageSection = e(".data-bg");
109            pageSection.each(function (indx) {
110                if (e(this).attr("data-background")) {
111                    e(this).css("background-image", "url(" + e(this).data("background") + ")");
112                }
113            });
114
115            e('.bg-image').each(function () {
116                var src = e(this).children('img').attr('src');
117                e(this).css('background-image', 'url(' + src + ')').children('img').hide();
118            });
119        },
120
121        n.setInstaHeight = function () {
122            e('.insta-slider-block').each(function () {
123                var img_width = e(this).find('.insta-item .af-insta-height').eq(0).innerWidth();
124
125                e(this).find('.insta-item .af-insta-height').css('height', img_width);
126            });
127        },
128
129
130        /* Slick Slider */
131        n.SlickCarousel = function () {
132
133
134
135            e(".full-slider-mode").not('.slick-initialized').slick({
136                slidesToShow: 1,
137                slidesToScroll: 1,
138                autoplay: true,
139                autoplaySpeed: 12000,
140                infinite: true,
141                nextArrow: '<span class="slide-icon slide-icon-1 slide-next icon-right fas fa-angle-right"></span>',
142                prevArrow: '<span class="slide-icon slide-icon-1 slide-prev icon-left fas fa-angle-left"></span>',
143                appendArrows: e('.af-main-navcontrols'),
144                rtl: rtl_slick()
145
146            });
147
148            function rtl_slick(){
149                if (e('body').hasClass("rtl")) {
150                    return true;
151                } else {
152                    return false;
153                }}
154
155
156            e(".posts-slider").not('.slick-initialized').slick({
157                slidesToShow: 1,
158                slidesToScroll: 1,
159                autoplay: true,
160                autoplaySpeed: 10000,
161                infinite: true,
162                nextArrow: '<i class="slide-icon slide-icon-1 slide-next icon-right fas fa-angle-right"></i>',
163                prevArrow: '<i class="slide-icon slide-icon-1 slide-prev icon-left fas fa-angle-left"></i>',
164                rtl: rtl_slick()
165            });
166
167            e("#aft-trending-story-five .trending-posts-carousel").not('.slick-initialized').slick({
168                autoplay: true,
169                vertical: true,
170                slidesToShow: 5,
171                slidesToScroll: 1,
172                verticalSwiping: true,
173                autoplaySpeed: 10000,
174                infinite: true,
175                nextArrow: '<i class="slide-icon slide-icon-1  slide-next fas fa-angle-down"></i>',
176                prevArrow: '<i class="slide-icon slide-icon-1 slide-prev fas fa-angle-up"></i>',
177                appendArrows: e('.af-trending-navcontrols'),
178                responsive: [
179                    {
180                        breakpoint: 1834,
181                        settings: {
182                            slidesToShow: 5
183                        }
184                    },
185                    {
186                        breakpoint: 991,
187                        settings: {
188                            slidesToShow: 5
189                        }
190                    },
191                    {
192                        breakpoint: 768,
193                        settings: {
194                            slidesToShow: 3
195                        }
196                    },
197
198                    {
199                        breakpoint: 480,
200                        settings: {
201                            slidesToShow: 3
202                        }
203                    }
204                ]
205            });
206
207            e(".trending-posts-carousel").not('.slick-initialized').slick({
208                autoplay: true,
209                vertical: true,
210                slidesToShow: 4,
211                slidesToScroll: 1,
212                verticalSwiping: true,
213                autoplaySpeed: 10000,
214                infinite: true,
215                nextArrow: '<i class="slide-icon slide-icon-1  slide-next fas fa-angle-down"></i>',
216                prevArrow: '<i class="slide-icon slide-icon-1 slide-prev fas fa-angle-up"></i>',
217                appendArrows: e('.af-trending-navcontrols'),
218                responsive: [
219                    {
220                        breakpoint: 1834,
221                        settings: {
222                            slidesToShow: 4
223                        }
224                    },
225                    {
226                        breakpoint: 991,
227                        settings: {
228                            slidesToShow: 4
229                        }
230                    },
231                    {
232                        breakpoint: 768,
233                        settings: {
234                            slidesToShow: 3
235                        }
236                    },
237
238                    {
239                        breakpoint: 480,
240                        settings: {
241                            slidesToShow: 3
242                        }
243                    }
244                ]
245            });
246
247
248
249            e(".trending-posts-vertical-carousel").not('.slick-initialized').slick({
250                autoplay: true,
251                vertical: true,
252                slidesToShow: 5,
253                slidesToScroll: 1,
254                verticalSwiping: true,
255                autoplaySpeed: 10000,
256                infinite: true,
257                nextArrow: '<i class="slide-icon slide-icon-1  slide-next fas fa-angle-down"></i>',
258                prevArrow: '<i class="slide-icon slide-icon-1 slide-prev fas fa-angle-up"></i>'
259            });
260
261            e("#primary .posts-carousel").slick({
262                slidesToShow: 3,
263                slidesToScroll: 1,
264                autoplay: true,
265                autoplaySpeed: 10000,
266                infinite: true,
267                rtl: rtl_slick(),
268                nextArrow: '<i class="slide-icon slide-icon-1 slide-next icon-right fas fa-angle-right"></i>',
269                prevArrow: '<i class="slide-icon slide-icon-1 slide-prev icon-left fas fa-angle-left"></i>',
270                responsive: [
271                    {
272                        breakpoint: 991,
273                        settings: {
274                            slidesToShow: 3,
275                            slidesToScroll: 3
276                        }
277                    },
278                    {
279                        breakpoint: 768,
280                        settings: {
281                            slidesToShow: 2,
282                            slidesToScroll: 2
283                        }
284                    },
285
286                    {
287                        breakpoint: 480,
288                        settings: {
289                            slidesToShow: 1,
290                            slidesToScroll: 1
291                        }
292                    }
293                ]
294            });
295
296            e("#secondary .posts-carousel").not('.slick-initialized').slick({
297                slidesToShow: 1,
298                slidesToScroll: 1,
299                autoplay: true,
300                autoplaySpeed: 10000,
301                infinite: true,
302                rtl: rtl_slick(),
303                nextArrow: '<i class="slide-icon slide-icon-1 slide-next icon-right fas fa-angle-right"></i>',
304                prevArrow: '<i class="slide-icon slide-icon-1 slide-prev icon-left fas fa-angle-left"></i>',
305
306            });
307
308            e(".gallery-columns-1").not('.slick-initialized').slick({
309                slidesToShow: 1,
310                slidesToScroll: 1,
311                fade: true,
312                autoplay: true,
313                autoplaySpeed: 10000,
314                infinite: true,
315                nextArrow: '<i class="slide-icon slide-icon-1 slide-next fa fa-arrow-right"></i>',
316                prevArrow: '<i class="slide-icon slide-icon-1 slide-prev fa fa-arrow-left"></i>',
317                dots: true
318            });
319
320
321
322        },
323
324        n.Preloader = function () {
325            e(window).on('load', function () {
326                e('#loader-wrapper').fadeOut();
327                e('#af-preloader').delay(500).fadeOut('slow');
328
329            });
330        },
331
332        n.Search = function () {
333            e(window).on('load', function () {
334                e(".af-search-click").on('click', function(){
335                    e("#af-search-wrap").toggleClass("af-search-toggle");
336                });
337            });
338
339
340        },
341
342        n.searchReveal = function () {
343
344
345
346            e(window).on('load', function () {
347            jQuery('.search-icon').on('click', function (event) {
348                event.preventDefault();
349                jQuery('.search-overlay').toggleClass('reveal-search');                
350            });
351
352            });
353
354            
355
356        },
357
358        // SHOW/HIDE SCROLL UP //
359        n.show_hide_scroll_top = function () {
360            if (e(window).scrollTop() > e(window).height() / 2) {
361                e("#scroll-up").fadeIn(300);
362            } else {
363                e("#scroll-up").fadeOut(300);
364            }
365        },
366
367        n.scroll_up = function () {
368            e("#scroll-up").on("click", function () {
369                e("html, body").animate({
370                    scrollTop: 0
371                }, 800);
372                return false;
373            });
374        },
375
376
377
378        n.em_sticky = function () {
379            jQuery('.home #secondary.aft-sticky-sidebar').theiaStickySidebar({
380                additionalMarginTop: 30
381            });
382        },
383
384
385        n.jQueryMarqueeRight = function () {
386            e('.marquee.flash-slide-right').marquee({
387                //duration in milliseconds of the marquee
388                speed: 80000,
389                //gap in pixels between the tickers
390                gap: 0,
391                //time in milliseconds before the marquee will start animating
392                delayBeforeStart: 0,
393                //'left' or 'right'
394                //direction: 'right',
395                //true or false - should the marquee be duplicated to show an effect of continues flow
396                duplicated: true,
397                pauseOnHover: true,
398                startVisible: true
399            });
400        },
401
402        n.jQueryMarquee = function () {
403            e('.marquee.flash-slide-left').marquee({
404                //duration in milliseconds of the marquee
405                speed: 80000,
406                //gap in pixels between the tickers
407                gap: 0,
408                //time in milliseconds before the marquee will start animating
409                delayBeforeStart: 0,
410                //'left' or 'right'
411                //direction: 'left',
412                //true or false - should the marquee be duplicated to show an effect of continues flow
413                duplicated: true,
414                pauseOnHover: true,
415                startVisible: true
416            });
417        },
418
419
420        e(function () {
421            n.mobileMenu.init(), n.DataBackground(), n.setInstaHeight(), n.jQueryMarquee(),n.jQueryMarqueeRight(), n.SlickCarousel(), n.scroll_up();
422        }), e(window).on('scroll', function () {
423        n.stickyMenu(), n.show_hide_scroll_top();
424    }), e(window).on('resize', function () {
425        n.mobileMenu.menuMobile();
426    }), e(window).on('load', function () {
427        e('#loader-wrapper').fadeOut();
428        e('#af-preloader').delay(500).fadeOut('slow');
429
430        e(".af-search-click").on('click', function(){
431            e("#af-search-wrap").toggleClass("af-search-toggle");
432        });
433
434        e('.search-icon').on('click', function (event) {
435            event.preventDefault();
436            e('.search-overlay').toggleClass('reveal-search');
437
438            if (e('.reveal-search').length) {
439                var searchElement = document.querySelector(".reveal-search");
440                if(searchElement){
441                    n.trapFocus(searchElement);
442                }
443            }
444        });
445
446    })
447})(jQuery);

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.