PageSourceSearch

https://www.pontilenews.it/wp-content/themes/darknews/assets/script.js?ver=7.1.2

js pontilenews.it collected 2026-09-26 16:12:06 UTC 22,189 bytes, 620 lines download raw bytes

1(function (e) {
2    "use strict";
3    var n = window.AFTHRAMPES_JS || {};
4    n.mobileMenu = {
5        init: function () {
6            this.toggleMenu(), this.menuMobile(), this.menuArrow();
7
8        },
9        toggleMenu: function () {
10            e('#masthead').on('click', '.toggle-menu', function (event) {
11                var ethis = e('.main-navigation .menu .menu-mobile');
12                if (ethis.css('display') == 'block') {
13                    ethis.slideUp('300');
14                } else {
15                    ethis.slideDown('300');
16                }
17                e('.ham').toggleClass('exit');
18            });
19            e('#masthead .main-navigation ').on('click', '.menu-mobile a button', function (event) {
20                event.preventDefault();
21                var ethis = e(this),
22                    eparent = ethis.closest('li');
23                if (eparent.find('> .children').length) {
24                    var esub_menu = eparent.find('> .children');
25                    var esub_menu = eparent.find('> .children');
26                } else {
27                    var esub_menu = eparent.find('> .sub-menu');
28                }
29                if (esub_menu.css('display') == 'none') {
30                    esub_menu.slideDown('300');
31                    ethis.addClass('active');
32                } else {
33                    esub_menu.slideUp('300');
34                    ethis.removeClass('active');
35                }
36                return false;
37            });
38        },
39        menuMobile: function () {
40            if (e('.main-navigation .menu > ul').length) {
41                var ethis = e('.main-navigation .menu > ul'),
42                    eparent = ethis.closest('.main-navigation'),
43                    pointbreak = eparent.data('epointbreak'),
44                    window_width = window.innerWidth;
45                if (typeof pointbreak == 'undefined') {
46                    pointbreak = 991;
47                }
48                if (pointbreak >= window_width) {
49                    ethis.addClass('menu-mobile').removeClass('menu-desktop');
50                    e('.main-navigation .toggle-menu').css('display', 'block');
51                    e('.main-navigation').addClass('aft-mobile-navigation');
52                } else {
53                    ethis.addClass('menu-desktop').removeClass('menu-mobile').css('display', '');
54                    e('.main-navigation .toggle-menu').css('display', '');
55                    e('.main-navigation').removeClass('aft-mobile-navigation');
56                }
57
58                if (e('.aft-mobile-navigation').length) {
59                    var navElement = document.querySelector(".aft-mobile-navigation");
60                    if(navElement){
61                        n.trapFocus(navElement);
62                    }
63                }
64                
65            }
66        },
67        menuArrow: function () {
68            if (e('#masthead .main-navigation div.menu > ul').length) {
69                e('#masthead .main-navigation div.menu > ul .sub-menu').parent('li').find('> a').append('<button class="fa fa-angle-down">');
70                e('#masthead .main-navigation div.menu > ul .children').parent('li').find('> a').append('<button class="fa fa-angle-down">');
71            }
72        }
73    },
74
75        n.trapFocus = function(element) {
76
77
78
79            var focusableEls = element.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled])'),
80                firstFocusableEl = focusableEls[0],
81                lastFocusableEl = focusableEls[focusableEls.length - 1],
82                KEYCODE_TAB = 9;
83
84            element.addEventListener('keydown', function(e) {
85                var isTabPressed = (e.key === 'Tab' || e.keyCode === KEYCODE_TAB);
86
87                if (!isTabPressed) {
88                    return;
89                }
90
91                if ( e.shiftKey ) /* shift + tab */ {
92                    if (document.activeElement === firstFocusableEl) {
93                        lastFocusableEl.focus();
94                        e.preventDefault();
95                    }
96                } else /* tab */ {
97                    if (document.activeElement === lastFocusableEl) {
98                        firstFocusableEl.focus();
99                        e.preventDefault();
100                    }
101                }
102
103            });
104        },
105
106        n.DataBackground = function () {
107            var pageSection = e(".data-bg");
108            pageSection.each(function (indx) {
109                if (e(this).attr("data-background")) {
110                    e(this).css("background-image", "url(" + e(this).data("background") + ")");
111                }
112            });
113            e('.bg-image').each(function () {
114                var src = e(this).children('img').attr('src');
115                e(this).css('background-image', 'url(' + src + ')').children('img').hide();
116            });
117        },
118        n.setInstaHeight = function () {
119            e('.insta-slider-block').each(function () {
120                var img_width = e(this).find('.insta-item .af-insta-height').eq(0).innerWidth();
121                e(this).find('.insta-item .af-insta-height').css('height', img_width);
122            });
123        },
124        n.Preloader = function () {
125
126            e('#loader-wrapper').fadeOut();
127            e('#af-preloader').delay(500).fadeOut('slow');
128
129        },
130        n.Search = function () {
131
132            e(".af-search-click").on('click', function () {
133                e("#af-search-wrap").toggleClass("af-search-toggle");
134            });
135
136        },
137        n.Offcanvas = function () {
138            e('#sidr').addClass('aft-mobile-off-canvas');
139            var offCanvasElement = document.querySelector(".aft-mobile-off-canvas");
140            if(offCanvasElement){
141                n.trapFocus(offCanvasElement);
142            }
143
144            e('.offcanvas-nav').sidr({
145                side: 'left',
146                displace: false,
147            });
148
149            e('.sidr-class-sidr-button-close').on('click', function () {
150                e.sidr('close', 'sidr');
151            });
152        },
153        // SHOW/HIDE SCROLL UP //
154        n.show_hide_scroll_top = function () {
155            if (e(window).scrollTop() > e(window).height() / 2) {
156                e("#scroll-up").fadeIn(300);
157            } else {
158                e("#scroll-up").fadeOut(300);
159            }
160        },
161        n.scroll_up = function () {
162            e("#scroll-up").on("click", function () {
163                e("html, body").animate({
164                    scrollTop: 0
165                }, 800);
166                return false;
167            });
168        },
169        n.MagnificPopup = function () {
170            e('div.zoom-gallery').magnificPopup({
171                delegate: 'a.insta-hover',
172                type: 'image',
173                closeOnContentClick: false,
174                closeBtnInside: false,
175                mainClass: 'mfp-with-zoom mfp-img-mobile',
176                image: {
177                    verticalFit: true,
178                    titleSrc: function (item) {
179                        return item.el.attr('title');
180                    }
181                },
182                gallery: {
183                    enabled: true
184                },
185                zoom: {
186                    enabled: true,
187                    duration: 300,
188                    opener: function (element) {
189                        return element.find('img');
190                    }
191                }
192            });
193            e('.gallery').each(function () {
194                e(this).magnificPopup({
195                    delegate: 'a',
196                    type: 'image',
197                    gallery: {
198                        enabled: true
199                    },
200                    zoom: {
201                        enabled: true,
202                        duration: 300,
203                        opener: function (element) {
204                            return element.find('img');
205                        }
206                    }
207                });
208            });
209
210            e('.wp-block-gallery').each(function () {
211                e(this).magnificPopup({
212                    delegate: 'a',
213                    type: 'image',
214                    gallery: {
215                        enabled: true
216                    },
217                    zoom: {
218                        enabled: true,
219                        duration: 300,
220                        opener: function (element) {
221                            return element.find('img');
222                        }
223                    }
224                });
225            });
226        },
227        n.searchReveal = function () {
228            jQuery('.search-overlay .search-icon').on('click', function () {
229                jQuery(this).parent().toggleClass('reveal-search');
230
231                if (e('.reveal-search').length) {
232                    var searchElement = document.querySelector(".reveal-search");
233                    if(searchElement){
234                        n.trapFocus(searchElement);
235                    }
236                }
237
238                return false;
239            });
240
241            jQuery('body').on('click', function (e) {
242                if (jQuery(".search-overlay").hasClass('reveal-search')) {
243                    var container = jQuery(".search-overlay");
244                    if (!container.is(e.target) && container.has(e.target).length === 0) {
245                        container.removeClass('reveal-search');
246                    }
247                }
248            });
249
250
251        },
252
253
254
255        n.jQueryMarquee = function () {
256            e('.marquee.aft-flash-slide').marquee({
257                //duration in milliseconds of the marquee
258                speed: 80000,
259                //gap in pixels between the tickers
260                gap: 0,
261                //time in milliseconds before the marquee will start animating
262                delayBeforeStart: 0,
263                //'left' or 'right'
264                // direction: 'right',
265                //true or false - should the marquee be duplicated to show an effect of continues flow
266                duplicated: true,
267                pauseOnHover: true,
268                startVisible: true
269            });
270        },
271
272        n.SliderAsNavFor = function () {
273            if (e('.banner-single-slider-1-wrap').hasClass("no-thumbnails")) {
274                return null;
275            } else {
276                return '.af-banner-slider-thumbnail';
277            }
278        },
279        n.RtlCheck = function () {
280            if (e('body').hasClass("rtl")) {
281                return true;
282            } else {
283                return false;
284            }
285        },
286        n.checkThumbOption = function () {
287            if (e('.hasthumbslide').hasClass('side')) {
288                return '.af-post-slider-thumbnail';
289            } else {
290                return false;
291            }
292        },
293
294        //slick slider
295        n.SlickBannerCarousel = function () {
296
297
298            e(".af-banner-carousel-1").not('.slick-initialized').slick({
299                autoplay: true,
300                autoplaySpeed: 5000,
301                infinite: true,
302                nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>',
303                prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>',
304                rtl: n.RtlCheck(),
305
306            });
307
308
309        },
310
311
312        n.SlickWidgetPostSlider = function () {
313
314            e(".af-posts-slider").not('.slick-initialized').slick({
315                slidesToShow: 1,
316                slidesToScroll: 1,
317                autoplay: true,
318                autoplaySpeed: 5000,
319                infinite: true,
320                nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>',
321                prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>',
322                rtl: n.RtlCheck(),
323
324            });
325        },
326
327        //Slick Carousel
328        n.SlickCarousel = function () {
329            e(".af-post-carousel").not('.slick-initialized').slick({
330                slidesToShow: 4,
331                slidesToScroll: 1,
332                autoplay: true,
333                autoplaySpeed: 5000,
334                infinite: true,
335                nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>',
336                prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>',
337                rtl: n.RtlCheck(),
338                responsive: [
339                    {
340                        breakpoint: 1025,
341                        settings: {
342                            slidesToShow: 3,
343                            slidesToScroll: 3
344                        }
345                    },
346                    {
347                        breakpoint: 769,
348                        settings: {
349                            slidesToShow: 2,
350                            slidesToScroll: 2
351                        }
352                    },
353                    {
354                        breakpoint: 600,
355                        settings: {
356                            slidesToShow: 1,
357                            slidesToScroll: 1
358                        }
359                    },
360                    {
361                        breakpoint: 480,
362                        settings: {
363                            slidesToShow: 1,
364                            slidesToScroll: 1
365                        }
366                    }
367                ]
368            });
369        },
370
371        n.WidgetSlickCarousel = function () {
372            e("#secondary .af-post-carousel").not('.slick-initialized').slick({
373                slidesToShow: 1,
374                slidesToScroll: 1,
375                autoplay: true,
376                autoplaySpeed: 5000,
377                infinite: true,
378                nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>',
379                prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>',
380                rtl: n.RtlCheck(),
381            });
382
383            e(".primary-footer .af-post-carousel").not('.slick-initialized').slick({
384                slidesToShow: 1,
385                slidesToScroll: 1,
386                autoplay: true,
387                autoplaySpeed: 5000,
388                infinite: true,
389                nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>',
390                prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>',
391                rtl: n.RtlCheck(),
392            });
393
394
395            e("#sidr .af-post-carousel").not('.slick-initialized').slick({
396                slidesToShow: 1,
397                slidesToScroll: 1,
398                autoplay: true,
399                autoplaySpeed: 5000,
400                infinite: true,
401                nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>',
402                prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>',
403                rtl: n.RtlCheck(),
404            });
405
406
407            e(".darknews_posts_carousel_widget .af-widget-post-carousel").not('.slick-initialized').slick({
408                slidesToShow: 3,
409                slidesToScroll: 1,
410                autoplay: true,
411                autoplaySpeed: 5000,
412                infinite: true,
413                nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>',
414                prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>',
415                rtl: n.RtlCheck(),
416                responsive: [
417                    {
418                        breakpoint: 1025,
419                        settings: {
420                            slidesToShow: 2,
421                            slidesToScroll: 2
422                        }
423                    },
424                    {
425                        breakpoint: 769,
426                        settings: {
427                            slidesToShow: 2,
428                            slidesToScroll: 2
429                        }
430                    },
431                    {
432                        breakpoint: 600,
433                        settings: {
434                            slidesToShow: 1,
435                            slidesToScroll: 1
436                        }
437                    },
438                    {
439                        breakpoint: 480,
440                        settings: {
441                            slidesToShow: 1,
442                            slidesToScroll: 1
443                        }
444                    }
445                ]
446            });
447        },
448
449
450        //Slick Carousel
451        n.SlickTrendingVerticalCarousel = function () {
452
453            e(".body.full-width-content #primary .banner-vertical-slider").not('.slick-initialized').slick({
454                slidesToShow: 3,
455                slidesToScroll: 1,
456                autoplay: true,
457                infinite: true,
458                loop: true,
459                dots: false,
460                prevArrow: false,
461                nextArrow: false,
462                responsive: [
463                    {
464                        breakpoint: 1025,
465                        settings: {
466                            slidesToShow: 2,
467                            draggable: false,
468                            swipeToSlide: false,
469                            touchMove: false,
470                            swipe: false
471
472                        }
473                    },
474                    {
475                        breakpoint: 600,
476                        settings: {
477                            slidesToShow: 1,
478                            draggable: false,
479                            swipeToSlide: false,
480                            touchMove: false,
481                            swipe: false
482
483                        }
484                    }
485                ]
486            });
487
488            e("#primary .banner-vertical-slider").not('.slick-initialized').slick({
489                slidesToShow: 2,
490                slidesToScroll: 1,
491                autoplay: true,
492                infinite: true,
493                loop: true,
494                dots: false,
495                prevArrow: false,
496                nextArrow: false,
497                responsive: [
498
499                    {
500                        breakpoint: 600,
501                        settings: {
502                            slidesToShow: 1,
503                            draggable: false,
504                            swipeToSlide: false,
505                            touchMove: false,
506                            swipe: false
507                        }
508                    }
509                ]
510            });
511
512            e(".aft-4-trending-posts .banner-vertical-slider").not('.slick-initialized').slick({
513                slidesToShow: 4,
514                slidesToScroll: 1,
515                autoplay: true,
516                infinite: true,
517                loop: true,
518                vertical: true,
519                verticalSwiping: true,
520                dots: false,
521                prevArrow: false,
522                nextArrow: false,
523                responsive: [
524                    {
525                        breakpoint: 1025,
526                        settings: {
527                            slidesToShow: 2,
528                            slidesToScroll: 1,
529                            vertical: false,
530                            verticalSwiping: false,
531                            draggable: false,
532                            swipeToSlide: false,
533                            touchMove: false,
534                            swipe: false,
535                            rtl: n.RtlCheck(),
536                        }
537                    },
538                    {
539                        breakpoint: 600,
540                        settings: {
541                            draggable: false,
542                            swipeToSlide: false,
543                            touchMove: false,
544                            swipe: false
545                        }
546                    }
547                ]
548            });
549
550            e(".banner-vertical-slider").not('.slick-initialized').slick({
551                slidesToShow: 5,
552                slidesToScroll: 1,
553                autoplay: true,
554                infinite: true,
555                loop: true,
556                vertical: true,
557                verticalSwiping: true,
558                dots: false,
559                prevArrow: false,
560                nextArrow: false,
561                responsive: [
562                    {
563                        breakpoint: 990,
564                        settings: {
565                            slidesToShow: 2,
566                            slidesToScroll: 1,
567                            vertical: false,
568                            verticalSwiping: false,
569                            draggable: false,
570                            swipeToSlide: false,
571                            touchMove: false,
572                            swipe: false,
573                            rtl: n.RtlCheck(),
574                        }
575                    },
576
577                    {
578                        breakpoint: 600,
579                        settings: {
580                            draggable: false,
581                            swipeToSlide: false,
582                            touchMove: false,
583                            swipe: false
584                        }
585                    }
586                ]
587            });
588        },
589
590
591
592
593
594    e(document).ready(function () {
595        n.mobileMenu.init(),
596            n.setInstaHeight(),
597            n.jQueryMarquee(),
598            n.MagnificPopup(),
599            n.Offcanvas(),
600            n.searchReveal(),
601            n.scroll_up(),
602            n.SlickBannerCarousel(),
603            n.SlickWidgetPostSlider(),
604            n.WidgetSlickCarousel(),
605            n.SlickCarousel(),
606            n.SlickTrendingVerticalCarousel()
607
608    }), e(window).scroll(function () {
609        n.show_hide_scroll_top();
610    }), e(window).load(function () {
611            n.DataBackground(),
612            n.Preloader(),
613            n.Search();
614    }),
615        e(window).resize(function () {
616
617            n.mobileMenu.menuMobile();
618        });
619
620})(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.