1jQuery(document).ready(function ($) { 2 $(".raven-post .raven-post-content").matchHeight(); 3 $(".raven-posts").bind("DOMSubtreeModified", function (e) { 4 $(".raven-post .raven-post-content").matchHeight(); 5 }); 6 7 var archives_title = $("#mc-archives-heading .raven-heading-title"); 8 if (archives_title.length) { 9 archives_title.html(archives_title.html().split("Category:").join("")); 10 archives_title.show(); 11 } 12 13 if (typeof $("#gform_wrapper_3") !== "undefined") { 14 var loading_div = $('<div id="jpx_geo_locating"><div>'); 15 var need_to_alert = false; 16 17 $(document) 18 .find("#gform_wrapper_3 .gform_footer") 19 .css("position", "relative"); 20 $(document).find("#gform_wrapper_3 .gform_footer").append(loading_div); 21 22 $(document) 23 .find('#gform_wrapper_3 input[name="input_4"]') 24 .on("change", function () { 25 var val = $('input[name="input_4"]:checked').val(); 26 if (val == "Oui") { 27 //Yes 28 console.log("checked Yes"); 29 need_to_alert = true; 30 jpx_geoFindMe(); 31 } else { 32 //No 33 console.log("checked No"); 34 need_to_alert = false; 35 loading_div.html(""); 36 } 37 }); 38 39 function jpx_geoFindMe() { 40 var options = { 41 enableHighAccuracy: true, 42 timeout: 20000, 43 maximumAge: 1000, 44 accuracy: 10, 45 }; 46 47 loading_div.html( 48 `<div style="position:absolute;top:0px;bottom:0px;left:0px;right:0px;width:100%; height:100%;margin:0 auto;text-align:center;background-color: rgba(0,0,0, 0.9);font-size:20px;z-index:1;color: #fff;display: flex;justify-content: center;align-items: center;border-radius: 20px;">Adresse de localisation...</div>` 49 ); 50 51 function success(position) { 52 const latitude = position.coords.latitude; 53 const longitude = position.coords.longitude; 54 55 var geoLink = ""; 56 //geoLink = `https://www.openstreetmap.org/#map=18/${latitude}/${longitude}`; 57 //geoLink = `https://nominatim.openstreetmap.org/ui/reverse.html?format=html&lat=${latitude}&lon=${longitude}&zoom=14`; 58 geoLink = `https://www.google.com/maps?q=${latitude},${longitude}&ll=${latitude},${longitude}&z=17`; 59 //geoLink = `<a href="${geoLink}">Latitude: ${latitude} °, Longitude: ${longitude} °</a>`; 60 61 $("#input_3_7").val( 62 `Latitude: ${latitude} °, Longitude: ${longitude} °` 63 ); 64 $("#input_3_8").val(geoLink); 65 66 console.log(geoLink); 67 68 loading_div.html(""); 69 } 70 71 function error() { 72 if (need_to_alert == true) { 73 alert("Impossible de récupérer votre position"); 74 fail_safemode(); 75 } 76 } 77 78 function fail_safemode() { 79 $("#choice_3_4_1").prop("checked", true); 80 $('input[name="input_4"]').trigger("change"); 81 loading_div.html(""); 82 } 83 84 if (!navigator.geolocation) { 85 alert( 86 "La géolocalisation n'est pas prise en charge par votre navigateur" 87 ); 88 fail_safemode(); 89 } else { 90 navigator.geolocation.getCurrentPosition(success, error, options); 91 } 92 } 93 } 94});
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.