<commit_before>// **** Menu | Navigation Bar Toggle Script ****** ////
$("#menu-toggle").click(function(e) {
    e.preventDefault();
    $("#wrapper").toggleClass("toggled");
});

// Class completely builds everything needed for each location marker.
var MarkerInfo = function(title, lng, lat, wikiID, pageID, marker) {
    var self = this;
    this.title = title;
    this.lng = lng;
    this.lat = lat;
    this.wikiID = wikiID;
    this.pageID = pageID;
    this.marker = marker;

};


var viewModel = {
    locations: [
        new MarkerInfo('Yala National Park', 6.426934, 81.308217, 'Yala_National_Park', 560254),
        new MarkerInfo('Wilpattu National Park', 8.455214, 80.042180, 'Wilpattu_National_Park', 15347986),
        new MarkerInfo('Gal Oya National Park', 7.228529, 81.471796, 'Gal_Oya_National_Park', 23678456),
        new MarkerInfo('Uda Walawe National Park', 6.473846, 80.898525, 'Udawalawe_National_Park', 579524),
        new MarkerInfo('Maduru Oya National Park', 7.525384, 81.256282, 'Maduru_Oya_National_Park', 28595145),
        new MarkerInfo('Horton Plains National Park', 6.802195, 80.806464, 'Horton_Plains_National_Park', 509982)
    ],
    searchBox: ko.observable(''),
    mapUnavailable: ko.observable(false)

};

// Search function for filtering through the list of locations based on the name of the location.
    viewModel.search = ko.dependentObservable(function() {
        var self = this;
        var search = this.searchBox().toLowerCase();
        return ko.utils.arrayFilter(self.locations, function(MarkerInfo) {
            return MarkerInfo.title.toLowerCase().indexOf(search) >= 0;
        });
    }, viewModel);

ko.applyBindings(viewModel);<commit_msg>feat: Open infoWindow when <li> item in search is clicked<commit_after>// **** Menu | Navigation Bar Toggle Script ****** ////
$("#menu-toggle").click(function(e) {
    e.preventDefault();
    $("#wrapper").toggleClass("toggled");
});

// Class completely builds everything needed for each location marker.
var MarkerInfo = function(title, lng, lat, wikiID, pageID, marker) {
    var self = this;
    this.title = title;
    this.lng = lng;
    this.lat = lat;
    this.wikiID = wikiID;
    this.pageID = pageID;
    this.marker = marker;

};


var viewModel = {
    locations: [
        new MarkerInfo('Yala National Park', 6.426934, 81.308217, 'Yala_National_Park', 560254),
        new MarkerInfo('Wilpattu National Park', 8.455214, 80.042180, 'Wilpattu_National_Park', 15347986),
        new MarkerInfo('Gal Oya National Park', 7.228529, 81.471796, 'Gal_Oya_National_Park', 23678456),
        new MarkerInfo('Uda Walawe National Park', 6.473846, 80.898525, 'Udawalawe_National_Park', 579524),
        new MarkerInfo('Maduru Oya National Park', 7.525384, 81.256282, 'Maduru_Oya_National_Park', 28595145),
        new MarkerInfo('Horton Plains National Park', 6.802195, 80.806464, 'Horton_Plains_National_Park', 509982)
    ],
    searchBox: ko.observable(''),
    mapUnavailable: ko.observable(false)
};

// Search function for filtering through the list of locations based on the name of the location.
    viewModel.search = ko.dependentObservable(function() {
        var self = this;
        var search = this.searchBox().toLowerCase();
        return ko.utils.arrayFilter(self.locations, function(MarkerInfo) {
            return MarkerInfo.title.toLowerCase().indexOf(search) >= 0;
        });
    }, viewModel);

    viewModel.clickInfoWindow = function() {
        // locations click binding function executed in view
        // marker.openInfoWindow();
    };



ko.applyBindings(viewModel);
{'fraction_non_alphanumeric': 0.13244666112496536, 'fraction_numerical': 0.07370462732058743, 'mean_word_length': 3.5523329129886507, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, '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': '2292613', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1148, 'n_words': 282}