<commit_before>//初始化autocomplate place_chenged event
tour.sendData = {};
function initMap() {
    var input =(document.getElementById('autocomplete'));
    var autocomplete = new google.maps.places.Autocomplete(input);
    autocomplete.addListener('place_changed', function() {
        var place = autocomplete.getPlace();
        if (!place.geometry) {
            //未獲得地點資訊
            return;
        }
        tour.sendData = {
            keyword: document.getElementById('autocomplete').value,
            lat:place.geometry.location.lat(),
            lng:place.geometry.location.lng()
        };
    });
}

$(function() {
    $('#btnFindTrip').on('click', function() {
        //暫時改丟靜態頁,之後改後端接
        //若無googlemap資訊 將值帶到下一頁
        if(typeof tour.sendData.keyword =='undefined'){
            var input =($('#autocomplete')).val();
            location.href = 'find?keyword='+input+'&lat='+tour.sendData.lat+'&lng='+tour.sendData.lng;
        }else{
            location.href = 'find?keyword='+tour.sendData.keyword+'&lat='+tour.sendData.lat+'&lng='+tour.sendData.lng;
        }
    });

    //圖片展示區塊
    $('.portfolio-link').on('click',function(e){
        e.preventDefault();
        var url = 'page/find?keyword='+$(this).data('place')+'&lat='+$(this).data('lat')+'&lng='+$(this).data('lng');
        location.href = url;
    });
});

<commit_msg>fix pohoto page/find -> /page/find<commit_after>//初始化autocomplate place_chenged event
tour.sendData = {};
function initMap() {
    var input =(document.getElementById('autocomplete'));
    var autocomplete = new google.maps.places.Autocomplete(input);
    autocomplete.addListener('place_changed', function() {
        var place = autocomplete.getPlace();
        if (!place.geometry) {
            //未獲得地點資訊
            return;
        }
        tour.sendData = {
            keyword: document.getElementById('autocomplete').value,
            lat:place.geometry.location.lat(),
            lng:place.geometry.location.lng()
        };
    });
}

$(function() {
    $('#btnFindTrip').on('click', function() {
        //暫時改丟靜態頁,之後改後端接
        //若無googlemap資訊 將值帶到下一頁
        if(typeof tour.sendData.keyword =='undefined'){
            var input =($('#autocomplete')).val();
            location.href = 'find?keyword='+input+'&lat='+tour.sendData.lat+'&lng='+tour.sendData.lng;
        }else{
            location.href = 'find?keyword='+tour.sendData.keyword+'&lat='+tour.sendData.lat+'&lng='+tour.sendData.lng;
        }
    });

    //圖片展示區塊
    $('.portfolio-link').on('click',function(e){
        e.preventDefault();
        var url = '/page/find?keyword='+$(this).data('place')+'&lat='+$(this).data('lat')+'&lng='+$(this).data('lng');
        location.href = url;
    });
});


{'fraction_non_alphanumeric': 0.1897810218978102, 'fraction_numerical': 0.0, 'mean_word_length': 2.6940700808625335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6784090', 'n_tokens_mistral': 938, 'n_tokens_neox': 956, 'n_words': 107}