PageSourceSearch

https://m-s.gr/js/theme.js

js m-s.gr collected 2026-09-29 06:48:30 UTC 5,192 bytes, 161 lines download raw bytes

1/*
2================================================================
3* Template:  	 DomainX - Domain for Sale Html Template
4* Written by: 	 Harnish Design - (http://www.harnishdesign.net)
5* Description:   Main Custom Script File
6================================================================
7*/
8
9
10(function ($) {
11	"use strict";
12
13// Preloader
14$(window).on('load', function () {
15	$('.lds-ellipsis').fadeOut(); // will first fade out the loading animation
16	$('.preloader').delay(333).fadeOut('slow'); // will fade out the white DIV that covers the website.
17	$('body').delay(333);
18});
19
20/*---------------------------------
21   Carousel (Owl Carousel)
22----------------------------------- */
23$(".owl-carousel").each(function (index) {
24    var a = $(this);
25	if ($("html").attr("dir") == 'rtl') {
26		var rtlVal = true
27	}else{
28		var rtlVal = false
29    }
30	$(this).owlCarousel({
31		rtl: rtlVal,
32		autoplay: a.data('autoplay'),
33		center: a.data('center'),
34		autoplayTimeout: a.data('autoplaytimeout'),
35		autoplayHoverPause: a.data('autoplayhoverpause'),
36		loop: a.data('loop'),
37		speed: a.data('speed'),
38		nav: a.data('nav'),
39		dots: a.data('dots'),
40		autoHeight: a.data('autoheight'),
41		autoWidth: a.data('autowidth'),
42		margin: a.data('margin'),
43		stagePadding: a.data('stagepadding'),
44		slideBy: a.data('slideby'),
45		lazyLoad: a.data('lazyload'),
46		navText:['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'],
47		animateOut: a.data('animateout'),
48		animateIn: a.data('animatein'),
49		video: a.data('video'),
50		items: a.data('items'),
51		responsive:{
52        0:{items: a.data('items-xs'),},
53        576:{items: a.data('items-sm'),},
54		768:{items: a.data('items-md'),},
55        992:{items: a.data('items-lg'),}
56        }
57    });
58});
59
60/*------------------------------------
61    YTPlayer YouTube Background
62-------------------------------------- */
63
64$(".player").each(function () {
65    $(this).mb_YTPlayer();
66});
67
68/*------------------------
69   tooltips
70-------------------------- */
71var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
72var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
73  return new bootstrap.Tooltip(tooltipTriggerEl)
74})
75
76
77/*------------------------
78 Contact Form
79 -------------------------- */
80var form = $('#contact-form'); // contact form
81var submit = $('#submit-btn'); // submit button
82
83// form submit event
84form.on('submit', function (e) {
85	e.preventDefault(); // prevent default form submit
86
87	if (typeof $('#google-recaptcha-v3').val() != "undefined") {
88		grecaptcha.ready(function () {
89			var site_key = $('#google-recaptcha-v3').attr('src').split("render=")[1];
90			grecaptcha.execute(site_key, {action: 'contact'}).then(function (token) {
91				var gdata = form.serialize() + '&g-recaptcha-response=' + token;
92				$.ajax({
93					url: 'php/mail.php',  // form action url
94					type: 'POST', 		  // form submit method get/post
95					dataType: 'json', 	  // request type html/json/xml
96					data: gdata, 		  // serialize form data
97					beforeSend: function () {
98						submit.attr("disabled", "disabled");
99						var loadingText = '<span role="status" aria-hidden="true" class="spinner-border spinner-border-sm align-self-center me-2"></span>Sending.....'; // change submit button text
100						if (submit.html() !== loadingText) {
101							submit.data('original-text', submit.html());
102							submit.html(loadingText);
103						}
104					},
105					success: function (data) {
106						submit.before(data.Message).fadeIn("slow"); // fade in response data 
107						submit.html(submit.data('original-text'));// reset submit button text
108						submit.removeAttr("disabled", "disabled");
109						if (data.response == 'success') {
110							form.trigger('reset'); // reset form
111						}
112						setTimeout(function () {
113							$('.alert-dismissible').fadeOut('slow', function(){
114								$(this).remove();
115							});
116						}, 3000);
117					},
118					error: function (e) {
119						console.log(e)
120					}
121				});
122			});
123		});
124	} else {
125		$.ajax({
126			url: 'php/mail.php', // form action url
127			type: 'POST', // form submit method get/post
128			dataType: 'json', // request type html/json/xml
129			data: form.serialize(), // serialize form data
130			beforeSend: function () {
131				submit.attr("disabled", "disabled");
132				var loadingText = '<span role="status" aria-hidden="true" class="spinner-border spinner-border-sm align-self-center me-2"></span>Sending.....'; // change submit button text
133				if (submit.html() !== loadingText) {
134					submit.data('original-text', submit.html());
135					submit.html(loadingText);
136				}
137			},
138			success: function (data) {
139				submit.before(data.Message).fadeIn("slow"); // fade in response data 
140				submit.html(submit.data('original-text'));// reset submit button text
141				submit.removeAttr("disabled", "disabled");
142				if (data.response == 'success') {
143					form.trigger('reset'); // reset form
144				}
145				setTimeout(function () {
146					$('.alert-dismissible').fadeOut('slow', function(){
147						$(this).remove();
148					});
149				}, 3000);
150				if (typeof $('#recaptcha-v2').val() != "undefined") {
151					grecaptcha.reset(); // reset reCaptcha
152				}
153			},
154			error: function (e) {
155				console.log(e)
156			}
157		});
158	}
159});
160
161})(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.