PageSourceSearch

https://news12.gr/wp-content/themes/vinkmag/assets/js/elementor.js?ver=5.0

js news12.gr collected 2026-10-02 13:37:20 UTC 23,114 bytes, 610 lines download raw bytes

1(function ($, elementor) {
2    "use strict";
3
4    var Vinkmag = {
5
6        init: function () {
7
8            var widgets = {
9                'vinazine-featured-post.default': Vinkmag.Vinkmag_Featured_Post_Widget,
10                'vinazine-popular-post.default': Vinkmag.Vinkmag_Popular_Post_Widget,
11                'vinazine-hot-post.default': Vinkmag.Vinkmag_Hot_Post_Widget,
12                'vinazine-more-post.default': Vinkmag.Vinkmag_More_Post_Widget,
13                'vinazine-video-post-slider.default': Vinkmag.Vinkmag_Video_Post_Slider_Widget,
14                'vinazine-post-block-slider.default': Vinkmag.Vinkmag_Post_Block_Slider_Widget,
15                'vinazine-trending-post.default': Vinkmag.Vinkmag_Trending_Post_Widget,
16                'vinazine-home-featured-slider.default': Vinkmag.Vinkmag_Home_Featured_Slider_Widget,
17                'vinazine-more-post2.default': Vinkmag.Vinkmag_More_Post2_Widget,
18                'vinazine-more-post-two.default': Vinkmag.Vertical_Grid_Post_Widget,
19            };
20
21            $.each(widgets, function (widget, callback) {
22                elementor.hooks.addAction('frontend/element_ready/' + widget, callback);
23            });
24
25        },
26
27
28
29        Vinkmag_Video_Post_Slider_Widget: function ($scope) {
30            var s = $scope.find('.video-slider');
31            if (s.length > 0) {
32                let video_slider = new Swiper(s['0'], {
33                    // Optional parameters
34                    direction: 'horizontal',
35                    allowTouchMove: true,
36                    mousewheel: {
37                        invert: true,
38                    },
39                    loop: true,
40                    breakpoints: {
41                        0: {
42                            slidesPerView: 1,
43                        },
44                        // breakpoint from 480 up
45                        480: {
46                            slidesPerView: 1,
47                        },
48                        // breakpoint from 768 up
49                        768: {
50                            slidesPerView: 2.1,
51                            centeredSlides: true,
52                        },
53                        // breakpoint from 768 up
54                        1200: {
55                            slidesPerView: 2.1,
56                            centeredSlides: true,
57                        }
58                    }
59                });
60                video_slider.slideTo(2, false, false);
61            }
62
63        },
64
65        Vinkmag_More_Post2_Widget: function ($scope) {
66            var carousel = $scope.find('.vinazine-more-post2');
67            if (carousel.length > 0) {
68                var autoplay = (carousel.attr('data-autoplay') == 'yes') ? true : false;
69                let slide_autoplay_delay = 5000;
70                new Swiper(carousel['0'], {
71                    // Optional parameters
72                    direction: 'horizontal',
73                    loop: true,
74                    effect: 'slide',
75                    slidesPerView: 4,
76                    speed: 600,
77                    mousewheelControl: 1,
78                    autoplay: autoplay ? { delay: slide_autoplay_delay } : false,
79                    breakpoints: {
80                        0: {
81                            slidesPerView: 1,
82                        },
83                        // breakpoint from 480 up
84                        480: {
85                            slidesPerView: 2,
86                            spaceBetween: 25,
87                        },
88                        // breakpoint from 768 up
89                        768: {
90                            slidesPerView: 2,
91                            spaceBetween: 25,
92                        },
93                        // breakpoint from 768 up
94                        1200: {
95                            slidesPerView: 4,
96                            spaceBetween: 32,
97                            allowTouchMove: true,
98                            mousewheel: {
99                                invert: true,
100                            },
101                        }
102
103                    }
104
105                });
106            }
107        },
108
109        Vinkmag_Featured_Post_Widget: function ($scope) {
110            var slider1 = $scope.find('.slider-grid-style1');
111            if (slider1.length > 0) {
112                let controls = slider1.data('controls');
113                let widget_id = controls.widget_id;
114                let slide_autoplay = Boolean(controls.show_autoplay ? true : false);
115                let slide_autoplay_delay = 5000;
116                new Swiper(slider1['0'], {
117                    // Optional parameters
118                    direction: 'horizontal',
119                    loop: true,
120                    slidesPerView: 1,
121                    effect: 'slide',
122                    speed: 600,
123                    allowTouchMove: true,
124                    mousewheelControl: 1,
125                    autoplay: slide_autoplay ? { delay: slide_autoplay_delay } : false,
126                    // Navigation arrows
127                    navigation: {
128                        nextEl: `.swiper-next-${widget_id}`,
129                        prevEl: `.swiper-prev-${widget_id}`,
130                    },
131                    breakpoints: {
132                        0: {
133                            slidesPerView: 1,
134                        },
135                        768: {
136                            slidesPerView: 1,
137                        },
138                        1024: {
139                            slidesPerView: 1,
140                        }
141
142                    }
143
144                });
145            }
146            var slider2 = $scope.find('.slider-grid-style2');
147            if (slider2.length > 0) {
148                let controls = slider2.data('controls');
149                let slide_autoplay = Boolean(controls.show_autoplay ? true : false);
150                let slide_autoplay_delay = 5000;
151                new Swiper(slider2['0'], {
152                    // Optional parameters
153                    direction: 'horizontal',
154                    loop: true,
155                    effect: 'slide',
156                    speed: 600,
157                    allowTouchMove: true,
158                    mousewheelControl: 1,
159                    autoplay: slide_autoplay ? { delay: slide_autoplay_delay } : false,
160                    pagination: {
161                        el: '.swiper-pagination',
162                        clickable: 'true',
163                    },
164                    breakpoints: {
165                        0: {
166                            slidesPerView: 1,
167                        },
168                        768: {
169                            slidesPerView: 1,
170                        },
171                        1024: {
172                            slidesPerView: 1,
173                        }
174
175                    }
176                });
177            }
178
179            var slider3 = $scope.find('.slider-grid-style3');
180            if (slider3.length > 0) {
181                let controls = slider3.data('controls');
182                let slide_autoplay = Boolean(controls.show_autoplay ? true : false);
183                let slide_autoplay_delay = 5000;
184                new Swiper(slider3['0'], {
185                    // Optional parameters
186                    direction: 'horizontal',
187                    loop: true,
188                    effect: 'slide',
189                    speed: 600,
190                    allowTouchMove: true,
191                    mousewheelControl: 1,
192                    autoplay: slide_autoplay ? { delay: slide_autoplay_delay } : false,
193                    pagination: {
194                        el: '.swiper-pagination',
195                        clickable: 'true',
196                    },
197                    breakpoints: {
198                        0: {
199                            slidesPerView: 1,
200                        },
201                        768: {
202                            slidesPerView: 1,
203                        },
204                        1024: {
205                            slidesPerView: 1,
206                        }
207
208                    }
209                });
210            }
211
212            var slider4 = $scope.find('.slider-grid-style4');
213            if (slider4.length > 0) {
214                let controls = slider4.data('controls');
215                let widget_id = controls.widget_id;
216                let slide_autoplay = Boolean(controls.show_autoplay ? true : false);
217                let slide_autoplay_delay = 5000;
218                new Swiper(slider4['0'], {
219                    // Optional parameters
220                    direction: 'horizontal',
221                    loop: true,
222                    slidesPerView: 1,
223                    effect: 'slide',
224                    speed: 600,
225                    allowTouchMove: true,
226                    mousewheelControl: 1,
227                    autoplay: slide_autoplay ? { delay: slide_autoplay_delay } : false,
228                    // Navigation arrows
229                    navigation: {
230                        nextEl: `.swiper-next-${widget_id}`,
231                        prevEl: `.swiper-prev-${widget_id}`,
232                    },
233                    breakpoints: {
234                        0: {
235                            slidesPerView: 1,
236                        },
237                        768: {
238                            slidesPerView: 1,
239                        },
240                        1024: {
241                            slidesPerView: 1,
242                        }
243
244                    }
245
246                });
247            }
248
249        },
250
251
252        Vinkmag_Post_Block_Slider_Widget: function ($scope) {
253            var slider1 = $scope.find('.vinazine-slider-block-style1');
254            if (slider1.length > 0) {
255                let controls = slider1.data('controls');
256                let widget_id = controls.widget_id;
257                new Swiper(slider1['0'], {
258                    // Optional parameters
259                    direction: 'horizontal',
260                    loop: true,
261                    slidesPerView: 1,
262                    effect: 'slide',
263                    speed: 600,
264                    allowTouchMove: true,
265                    mousewheelControl: 1,
266                    //Navigation arrows
267                    navigation: {
268                        nextEl: `.swiper-next-${widget_id}`,
269                        prevEl: `.swiper-prev-${widget_id}`,
270                    },
271                    breakpoints: {
272                        0: {
273                            slidesPerView: 1,
274                        },
275                        768: {
276                            slidesPerView: 1,
277                        },
278                        1024: {
279                            slidesPerView: 1,
280                        }
281
282                    }
283                });
284            }
285
286            var slider2 = $scope.find('.vinazine-slider-block-style2');
287            if (slider2.length > 0) {
288                let controls = slider2.data('controls');
289                let widget_id = controls.widget_id;
290                new Swiper(slider2['0'], {
291                    // Optional parameters
292                    direction: 'horizontal',
293                    loop: true,
294                    slidesPerView: 1,
295                    effect: 'slide',
296                    speed: 600,
297                    allowTouchMove: true,
298                    mousewheelControl: 1,
299                    autoplay: {
300                        delay: 3000,
301                    },
302                    //Navigation arrows
303                    navigation: {
304                        nextEl: `.swiper-next-${widget_id}`,
305                        prevEl: `.swiper-prev-${widget_id}`,
306                    },
307                    breakpoints: {
308                        0: {
309                            slidesPerView: 1,
310                        },
311                        768: {
312                            slidesPerView: 1,
313                        },
314                        1024: {
315                            slidesPerView: 1,
316                        }
317
318                    }
319                });
320            }
321
322
323        },
324
325
326        Vinkmag_More_Post_Widget: function ($scope) {
327            var carousel = $scope.find('.vinazine-more-post');
328            if (carousel.length > 0) {
329                var autoplay = (carousel.attr('data-autoplay') == 'yes') ? true : false;
330                let slide_autoplay_delay = 5000;
331                new Swiper(carousel['0'], {
332                    // Optional parameters
333                    direction: 'horizontal',
334                    loop: true,
335                    effect: 'slide',
336                    speed: 600,
337                    mousewheelControl: 1,
338                    allowTouchMove: true,
339                    autoplay: autoplay ? { delay: slide_autoplay_delay } : false,
340                    pagination: {
341                        el: '.swiper-pagination-popular-post',
342                        clickable: true,
343                    },
344                    breakpoints: {
345                        0: {
346                            slidesPerView: 1,
347                        },
348                        // breakpoint from 480 up
349                        480: {
350                            slidesPerView: 1,
351                        },
352                        // breakpoint from 768 up
353                        768: {
354                            slidesPerView: 2,
355                            spaceBetween: 30,
356                            slidesPerGroup: 2,
357                            mousewheel: {
358                                invert: true,
359                            },
360                        },
361                        // breakpoint from 768 up
362                        1200: {
363                            slidesPerView: 3,
364                            spaceBetween: 30,
365                            slidesPerGroup: 3,
366                            mousewheel: {
367                                invert: true,
368                            },
369                        }
370
371                    }
372
373                });
374            }
375        },
376
377
378
379
380
381        Vinkmag_Hot_Post_Widget: function ($scope) {
382            var carousel = $scope.find('.hot-topics-slider');
383            if (carousel.length > 0) {
384                var autoplay = (carousel.attr('data-autoplay') == 'yes') ? true : false;
385                let slide_autoplay_delay = 5000;
386                new Swiper(carousel['0'], {
387                    // Optional parameters
388                    direction: 'horizontal',
389                    loop: true,
390                    effect: 'slide',
391                    slidesPerView: 4,
392                    speed: 600,
393                    mousewheelControl: 1,
394                    autoplay: autoplay ? { delay: slide_autoplay_delay } : false,
395                    pagination: {
396                        el: '.vertical-post-slider1',
397                        clickable: true,
398                    },
399                    breakpoints: {
400                        0: {
401                            slidesPerView: 1,
402                            slidesPerGroup: 1,
403                        },
404                        // breakpoint from 480 up
405                        480: {
406                            slidesPerView: 2,
407                            spaceBetween: 25,
408                            slidesPerGroup: 2,
409                        },
410                        // breakpoint from 768 up
411                        768: {
412                            slidesPerView: 2,
413                            spaceBetween: 25,
414                            slidesPerGroup: 2,
415                        },
416                        // breakpoint from 768 up
417                        1200: {
418                            slidesPerView: 4,
419                            spaceBetween: 30,
420                            slidesPerGroup: 4,
421                            allowTouchMove: true,
422                            mousewheel: {
423                                invert: true,
424                            },
425                        }
426
427                    }
428
429                });
430            }
431        },
432        Vinkmag_Home_Featured_Slider_Widget: function ($scope) {
433            var carousel = $scope.find('.hero-slider');
434            if (carousel.length > 0) {
435                let controls = carousel.data('controls');
436                let widget_id = controls.widget_id;
437                let slide_autoplay = Boolean(controls.show_autoplay ? true : false);
438                let slide_autoplay_delay = 5000;
439                let hero_slider = new Swiper(carousel['0'], {
440                    // Optional parameters
441                    direction: 'horizontal',
442                    loop: true,
443                    slidesPerView: 1,
444                    effect: 'slide',
445                    speed: 600,
446                    allowTouchMove: true,
447                    mousewheelControl: 1,
448                    autoplay: slide_autoplay ? { delay: slide_autoplay_delay } : false,
449
450                    // Navigation arrows
451                    navigation: {
452                        nextEl: `.swiper-next-${widget_id}`,
453                        prevEl: `.swiper-prev-${widget_id}`,
454                    },
455                    breakpoints: {
456                        0: {
457                            slidesPerView: 1,
458                        },
459                        768: {
460                            slidesPerView: 1,
461                        },
462                        1024: {
463                            slidesPerView: 1,
464                        }
465
466                    }
467                });
468                document.getElementById("current-index").innerHTML = hero_slider.realIndex + 1;
469                document.getElementById("total-slides").innerHTML = hero_slider.slides.length - 2;
470                hero_slider.on('slideChange', function () {
471                    document.getElementById("current-index").innerHTML = hero_slider.realIndex + 1;
472                });
473            }
474        },
475
476
477        Vinkmag_Popular_Post_Widget: function ($scope) {
478            var popular_slider = $scope.find('.most-populers');
479            if (popular_slider.length > 0) {
480                var autoplay = (popular_slider.attr('data-autoplay') == 'yes') ? true : false;
481                let slide_autoplay_delay = 5000;
482                new Swiper(popular_slider['0'], {
483                    // Optional parameters
484                    direction: 'horizontal',
485                    loop: true,
486                    effect: 'slide',
487                    speed: 600,
488                    mousewheelControl: 1,
489                    allowTouchMove: true,
490                    autoplay: autoplay ? { delay: slide_autoplay_delay } : false,
491                    breakpoints: {
492                        0: {
493                            slidesPerView: 1,
494                        },
495                        // breakpoint from 480 up
496                        480: {
497                            slidesPerView: 1,
498                        },
499                        // breakpoint from 768 up
500                        768: {
501                            slidesPerView: 2,
502                            spaceBetween: 30,
503                            mousewheel: {
504                                invert: true,
505                            },
506                        },
507                        // breakpoint from 768 up
508                        1200: {
509                            slidesPerView: 4,
510                            spaceBetween: 30,
511                            mousewheel: {
512                                invert: true,
513                            },
514                        }
515
516                    }
517
518                });
519
520            }
521        },
522        Vertical_Grid_Post_Widget: function ($scope) {
523            var grid_slider = $scope.find('.grid-slider');
524            if (grid_slider.length > 0) {
525                var autoplay = (grid_slider.attr('data-autoplay') == 'yes') ? true : false;
526                let slide_autoplay_delay = 5000;
527                new Swiper(grid_slider['0'], {
528                    // Optional parameters
529                    direction: 'horizontal',
530                    loop: true,
531                    effect: 'slide',
532                    speed: 600,
533                    mousewheelControl: 1,
534                    allowTouchMove: true,
535                    autoplay: autoplay ? { delay: slide_autoplay_delay } : false,
536                    breakpoints: {
537                        0: {
538                            slidesPerView: 1,
539                        },
540                        // breakpoint from 480 up
541                        480: {
542                            slidesPerView: 1,
543                        },
544                        // breakpoint from 768 up
545                        768: {
546                            slidesPerView: 2,
547                            spaceBetween: 30,
548                            mousewheel: {
549                                invert: true,
550                            },
551                        },
552                        // breakpoint from 768 up
553                        1200: {
554                            slidesPerView: 4,
555                            spaceBetween: 30,
556                            mousewheel: {
557                                invert: true,
558                            },
559                        }
560
561                    }
562
563                });
564            }
565
566        },
567
568        Vinkmag_Trending_Post_Widget: function ($scope) {
569            var sync1 = $scope.find('.vinazine-trending-1');
570            var sync2 = $scope.find('.vinazine-trending-2');
571            if (sync1.length > 0 && sync2.length > 0) {
572                let controls = sync1.data('controls');
573                let widget_id = controls.widget_id;
574                new Swiper(sync1['0'], {
575                    loop: true,
576                    loopedSlides: 5, //looped slides should be the same
577                    navigation: {
578                        nextEl: `.swiper-next-${widget_id}`,
579                        prevEl: `.swiper-prev-${widget_id}`,
580                    },
581                    thumbs: {
582                        swiper: new Swiper(sync2['0'], {
583                            spaceBetween: 30,
584                            slidesPerView: 1,
585                            loop: true,
586                            freeMode: true,
587                            loopedSlides: 5, //looped slides should be the same
588                            watchSlidesVisibility: true,
589                            watchSlidesProgress: true,
590                            breakpoints: {
591                                0: {
592                                    slidesPerView: 1,
593                                },
594                                767: {
595                                    slidesPerView: 2,
596                                },
597                                1024: {
598                                    slidesPerView: 2,
599                                },
600                            },
601                        }),
602                    },
603                });
604            }
605        },
606    };
607
608    $(window).on('elementor/frontend/init', Vinkmag.init);
609
610}(jQuery, window.elementorFrontend));

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.