<commit_before>// Uses local storage to add a note
function storeToLocalStorage(note){
    localStorage.setItem(note.storageKey, JSON.stringify(note));
};

// Event listener for the create note button
var button = document.getElementById("save");
var view = ""
button.addEventListener('click', function(){
    note = new PinPoint.Note();
    storeToLocalStorage(note);
});

// working on loop for regex application
    for (i=0; i<localStorage.length; i++)   {
        console.log(localStorage.key(i)+"=["+localStorage.getItem(localStorage.key(i))+"]");
    }

// go through all the keys in localstorage
// take the ones that begin with the correct url using regex(underscore)
// find the values, put them in an array, iterate over the array and parse values

// When the popup HTML has loaded
//***** Need to change this to different event so we aren't
// getting time on load, but click event instead *******
window.addEventListener('load', function() {
    // Get the event page
    view = new PinPoint.View();
    view.loadNotesFromDatabase();
    chrome.runtime.getBackgroundPage(function(eventPage) {
        // Call the getTime function in the event page, passing in
        // our onPageDetailsReceived function as the callback. This injects
        // content.js into the current tab's HTML

        // jenbex testing note controller functions without lack of note object blocking us
        // ****** eventPage.getPageDetails(PinPoint.NoteController.getTime);
        // var note = {noteTime: "9:30", timeUrl: ""}
        // PinPoint.NoteController.getUrl(note);

    });
});


<commit_msg>Add comment to 'load' event listener for the window<commit_after>// Uses local storage to add a note
function storeToLocalStorage(note){
    localStorage.setItem(note.storageKey, JSON.stringify(note));
};

// Event listener for the create note button
var button = document.getElementById("save");
var view = ""
button.addEventListener('click', function(){
    note = new PinPoint.Note();
    storeToLocalStorage(note);
});

// working on loop for regex application
    for (i=0; i<localStorage.length; i++)   {
        console.log(localStorage.key(i)+"=["+localStorage.getItem(localStorage.key(i))+"]");
    }

// go through all the keys in localstorage
// take the ones that begin with the correct url using regex(underscore)
// find the values, put them in an array, iterate over the array and parse values

// When the popup HTML has loaded
//***** Need to change this to different event so we aren't
// getting time on load, but click event instead *******
window.addEventListener('load', function() {
    //a new view should be instantiated inside the controller when the defineView method is called on the controller, see Steven's code in the grocery.js file (controller.defineView(new GroceryApp.View()))
    view = new PinPoint.View();
    view.loadNotesFromDatabase();
    //get the event page
    chrome.runtime.getBackgroundPage(function(eventPage) {
        // Call the getTime function in the event page, passing in
        // our onPageDetailsReceived function as the callback. This injects
        // content.js into the current tab's HTML

        // jenbex testing note controller functions without lack of note object blocking us
        // ****** eventPage.getPageDetails(PinPoint.NoteController.getTime);
        // var note = {noteTime: "9:30", timeUrl: ""}
        // PinPoint.NoteController.getUrl(note);

    });
});



{'fraction_non_alphanumeric': 0.11646819634040081, 'fraction_numerical': 0.0023235550392099913, 'mean_word_length': 3.5555555555555554, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '7399708', 'n_tokens_mistral': 932, 'n_tokens_neox': 904, 'n_words': 339}