PageSourceSearch

https://remilly-sur-tille.fr/wp-content/plugins/smifloatmenu/public/js/smifm_modal.js?ver=6.6.1

js remilly-sur-tille.fr collected 2026-10-03 02:47:14 UTC 2,997 bytes, 98 lines download raw bytes

1function smiMenuModal(){
2// Get the modal
3var modalmeteo = document.getElementById('smimodalmeteo');
4var modalgeoloc = document.getElementById('smimodalgeoloc');
5var modalnousecrire = document.getElementById('smimodalnousecrire');
6
7// Get the button that opens the modal
8var clickmeteo = document.getElementById("meteo");
9var clickgeoloc = document.getElementById("geoloc");
10var clicknousecrire = document.getElementById("nous-ecrire");
11
12// Get the <span> element that closes the modal
13var span = document.getElementsByClassName("smiClose")[0];
14var span1 = document.getElementsByClassName("smiClose")[1];
15var span2 = document.getElementsByClassName("smiClose")[2];
16
17// Get the <p> to execute géolocalisation shortcode when displaying
18var smiexegeo = document.getElementById("smiMap");
19var smiLat = parseFloat(smiexegeo.getAttribute("data-smiLat"));
20var smiLong = parseFloat(smiexegeo.getAttribute("data-smiLong"));
21var smiCenter = [smiLat, smiLong];
22var smiAdresse = smiexegeo.getAttribute("data-smiAdresse");
23var smiCpNom = smiexegeo.getAttribute("data-smiCpNom");
24
25// When the user clicks the button, open the modal 
26
27clickgeoloc.onclick = function() {
28	modalmeteo.style.display = "none";
29	if( modalnousecrire ) {
30		modalnousecrire.style.display = "none";	
31	}
32	modalgeoloc.style.display = "flex";
33	var map = L.map('smiMap', {
34            center: smiCenter,
35            zoom: 15
36        });//with leaflet
37	L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
38	attribution: 'Données de la carte &copy; <a href="http://www.openstreetmap.org/#Map=5/51.500/-0.100">Open Street Map</a>',
39	maxZoom: 18
40	}).addTo(map);//with leaflet
41
42	L.marker(smiCenter).addTo(map)
43    .bindPopup(smiAdresse+'<br>'+smiCpNom)
44    .openPopup();
45
46}
47
48
49if( clicknousecrire ) {
50	clicknousecrire.onclick = function() {
51		var smifm_href_sve = document.getElementById('smifm_href_sve');
52		if( smifm_href_sve != null ) {
53			var url=smifm_href_sve.href;
54			if( smifm_href_sve.target == '_blank' ) {
55				//window.open( url, '_blank' );
56			} else {
57				window.open( url, '_self' );
58			}
59		} else {
60			modalnousecrire.style.display = "flex";
61			modalmeteo.style.display = "none";
62			modalgeoloc.style.display = "none";
63		}
64	}
65}
66
67clickmeteo.onclick = function() {
68	modalmeteo.style.display = "flex";
69	modalgeoloc.style.display = "none";
70	if( modalnousecrire ) {
71		modalnousecrire.style.display = "none";
72	}
73}
74
75// When the user clicks on <span> (x), close the modal
76span.onclick = function() {
77	modalmeteo.style.display = "none";
78}
79span1.onclick = function() {
80	modalgeoloc.style.display = "none";
81}
82if( span2 ) {
83	span2.onclick = function() {
84		modalnousecrire.style.display = "none";
85	}
86}
87// When the user clicks anywhere outside of the modal, close it
88window.onclick = function(event) {
89	if (event.target == modalmeteo) {
90		modalmeteo.style.display = "none";
91	}
92	if(event.target == modalgeoloc) {
93		modalgeoloc.style.display = "none";
94	}
95	if (event.target == modalnousecrire) {
96		modalnousecrire.style.display = "none";
97	}
98}}

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.