PageSourceSearch

https://www.obec-dobravoda.cz/assets/fe/js/front.js?v=1747651577

js obec-dobravoda.cz collected 2026-10-02 20:52:31 UTC 2,559 bytes, 101 lines download raw bytes

1
2$(document).ready(function(){
3    $().fancybox({
4        selector: '[data-fancybox=""]'
5        });
6});
7
8Nette.showModal = function (message, onclose) {
9	let dialog = document.createElement('dialog');
10
11	if (!dialog.showModal) {
12		alert(message);
13		onclose();
14		return;
15	}
16	let formattedMessage = '';
17	let lines = message.split('\n');
18
19	lines.forEach((line) => {
20		formattedMessage += `<p>${line}</p>`;
21	});
22
23	let button = document.createElement('button');
24	button.classList.add('btn', 'bt', 'bt-dark');
25	button.innerText = 'OK';
26
27	button.onclick = () => {
28		dialog.remove();
29		onclose();
30	};
31
32	let infoText = '<div class="wrapper-info">' + formattedMessage + '</div>';
33
34	let wrapperButton = document.createElement('div');
35	wrapperButton.className = 'wrapper-button';
36	wrapperButton.appendChild(button);
37
38	dialog.setAttribute('class', 'netteFormsModal-custom');
39	dialog.innerHTML = infoText;
40	dialog.append(wrapperButton);
41	document.body.append(dialog);
42	dialog.showModal();
43};
44
45
46(function(document, Nette) {
47    let init = false;
48
49    Nette.handleClickContact = function() {
50        if (init) {
51            return;
52        }
53
54        document.addEventListener('DOMContentLoaded', function() {
55            let contactLinks = document.querySelectorAll('a[href^="tel:"], a[href^="mailto:"]');
56            contactLinks.forEach(function(link) {
57                link.addEventListener('click', function(event) {
58                    let href = this.getAttribute('href');
59					let contactType;
60					let contactValue;
61
62					if(href.startsWith('tel:')){
63						contactType = 'phone';
64						contactValue = href.replace('tel:', '');
65					} else if (href.startsWith('mailto:')){
66						contactType = 'email';
67						contactValue = href.replace('mailto:', '');
68					}
69
70					$.nette.ajax({
71						url: $(this).data('url'),
72						method: 'POST',
73						data: {
74							do: 'clickContact',
75							contactType: contactType,
76							contactValue: contactValue,
77						},
78						start: function () {
79							setAjaxAnimationStop();
80						},
81						success: function(payload) {
82							if (payload.result && payload.result.GtmTracking) {
83								if (payload.result.FacebookConversionTracking) {
84									payload.result.GtmTracking.fb_event_id = payload.result.FacebookConversionTracking;
85								}
86								window.dataLayer = window.dataLayer || [];
87								window.dataLayer.push(payload.result.GtmTracking);
88							}
89						},
90					})
91                });
92            });
93        });
94
95        init = true;
96    };
97
98    if (!init) {
99        Nette.handleClickContact();
100    }
101})(document, Nette);

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.