<commit_before>var resultsList = [],
    unlikely = "dewey";

// Return the suggestions
chrome.omnibox.onInputChanged.addListener(function(text, suggest) {

    chrome.bookmarks.search(text, function(searchResults) {

        resultsList = [];

        for (var i = 0; i < searchResults.length; i++) {

            var item = searchResults[i];
            if(item.url === void 0) continue;

            if(item.url.substring(0, 11) === "javascript:") continue;

            resultsList.push({
                content:     unlikely + item.url,
                description: item.title.replace(new RegExp("(" + text + ")", "gi"), "<match>$1</match>")
            });
        };

        var defaultSuggestion = '';
        if(resultsList.length > 0){
            defaultSuggestion = resultsList[0].description;
            suggest(resultsList.slice(1, -1));
        }
        chrome.omnibox.setDefaultSuggestion({ description: defaultSuggestion });
    })
});

chrome.omnibox.onInputEntered.addListener( function(text) {

    // If text doesn't have unlikely prepended its the stupid default
    if(text.substring(0, unlikely.length) !== unlikely) {
        text = resultsList[0].content;
    }

    text = text.substring(unlikely.length); // Trim the unlikely string

    if (text.substring(0, 11) == "javascript:") {
        chrome.tabs.executeScript(null, { code: decodeURIComponent(text) });
    }
    else {
        //chrome.tabs.update({ url: text });

        chrome.tabs.update({ url: chrome.extension.getURL('app.html') });
    }
});<commit_msg>code clean up<commit_after>var resultsList = [],
    unlikely = "dewey";

// Return the suggestions
chrome.omnibox.onInputChanged.addListener(function(text, suggest) {

    chrome.bookmarks.search(text, function(searchResults) {

        resultsList = [];

        for (var i = 0; i < searchResults.length; i++) {

            var item = searchResults[i];
            if(item.url === void 0) continue;

            if(item.url.substring(0, 11) === "javascript:") continue;

            resultsList.push({
                content:     unlikely + item.url,
                description: item.title.replace(new RegExp("(" + text + ")", "gi"), "<match>$1</match>")
            });
        };

        var defaultSuggestion = '';
        if(resultsList.length > 0){
            defaultSuggestion = resultsList[0].description;
            suggest(resultsList.slice(1, -1));
        }
        chrome.omnibox.setDefaultSuggestion({ description: defaultSuggestion });
    })
});

chrome.omnibox.onInputEntered.addListener( function(text) {

    // If text doesn't have unlikely prepended its the stupid default
    if(text.substring(0, unlikely.length) !== unlikely) {
        text = resultsList[0].content;
    }

    text = text.substring(unlikely.length); // Trim the unlikely string

    if (text.substring(0, 11) == "javascript:") {
        chrome.tabs.executeScript(null, { code: decodeURIComponent(text) });
    }
    else {
        chrome.tabs.update({ url: text });

        //chrome.tabs.update({ url: chrome.extension.getURL('app.html') });
    }
});
{'fraction_non_alphanumeric': 0.14893617021276595, 'fraction_numerical': 0.009671179883945842, 'mean_word_length': 2.482603815937149, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6761624', 'n_tokens_mistral': 941, 'n_tokens_neox': 882, 'n_words': 178}