PageSourceSearch

https://www.trouver-mon-photographe.fr/lib/js/autocomplete-btoc-btob.js

js trouver-mon-photographe.fr collected 2026-10-07 23:08:05 UTC 2,935 bytes, 70 lines download raw bytes

1var autocomplete = null;
2var autocompleteListener = null;
3
4/** AUTO COMPLETE **/
5function activatePlacesSearch() {
6
7    var options = {
8        componentRestrictions: {
9            country: countryAutoComp
10        },
11        types: [typeAutocomplete]
12    };
13    var input = document.getElementById('autocomplete-top');
14    let inputBottom = document.getElementById('autocomplete-bottom');
15
16    if (autocompleteListener !== null) { // aPour éviter le problème du double autocomplete
17        google.maps.event.removeListener(autocompleteListener);
18        google.maps.event.clearInstanceListeners(autocomplete);
19        $(".pac-container").remove();
20    }
21    
22    if(input){
23        autocomplete = new google.maps.places.Autocomplete(input, options);
24        autocompleteListener = google.maps.event.addListener(autocomplete, 'place_changed', onPlaceChanged);
25    }
26    if(inputBottom){
27        autocompleteBottom = new google.maps.places.Autocomplete(inputBottom, options);
28        autocompleteListenerBottom = google.maps.event.addListener(autocompleteBottom, 'place_changed', onPlaceChangedBottom);
29    }
30};
31
32function onPlaceChanged() {
33    let searchZipCodeInput = document.getElementById('search-zip-code');
34    searchZipCodeInput.value = '';
35    let searchCityInput = document.getElementById('search-city');
36    searchCityInput.value = '';
37    let searchDepartmentInput = document.getElementById('search-department');
38    searchDepartmentInput.value = '';
39    let searchRegionInput = document.getElementById('search-region');
40    searchRegionInput.value = '';
41    let searchCountryInput = document.getElementById('search-country');
42    searchCountryInput.value = '';
43    let searchAddress = document.getElementById('search-address');
44    searchAddress.value = '';
45
46    autocompleteFiller(this, searchZipCodeInput, searchCityInput, searchDepartmentInput, searchRegionInput, searchCountryInput, searchAddress)
47}
48
49function onPlaceChangedBottom() {
50    let searchZipCodeInput = document.getElementById('search-zip-code-bottom');
51    searchZipCodeInput.value = '';
52    let searchCityInput = document.getElementById('search-city-bottom');
53    searchCityInput.value = '';
54    let searchDepartmentInput = document.getElementById('search-department-bottom');
55    searchDepartmentInput.value = '';
56    let searchRegionInput = document.getElementById('search-region-bottom');
57    searchRegionInput.value = '';
58    let searchCountryInput = document.getElementById('search-country-bottom');
59    searchCountryInput.value = '';
60    let searchAddress = document.getElementById('search-address-bottom');
61    searchAddress.value = '';
62
63    autocompleteFiller(this, searchZipCodeInput, searchCityInput, searchDepartmentInput, searchRegionInput, searchCountryInput, searchAddress)
64}
65
66$('#autocomplete-workerplace').focus(function () {
67    if (!$(this).hasClass('input-google-autocomplete')) {
68        $(this).attr('autocomplete', 'off');
69    }
70});

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.