<commit_before>(function() {
    var container = document.getElementById('container'),
        filter = document.getElementById('filter-input'),
        closedTabs;

    function getList(tabs) {
        return tabs.map(function (session, index) {
            return '<a class="li" data-id="' + session.tab.sessionId + '" title="' + session.tab.url +
                '"><div class="item"><img src="' + (session.tab.favIconUrl || 'media/icon_16.png') +
                '"/><span>' + session.tab.title + '</span></div></a>';
        }).join('');
    }

    function render(tabs) {
        if (tabs.length) {
            container.innerHTML = getList(tabs);
            bindClicks();
        } else {
            container.innerHTML = '<div class="li"><span>Nothing found</span></div>'
        }
    }

    chrome.runtime.getBackgroundPage(function(bg) {
        bg.getClosedTabs(function (tabs) {
            closedTabs = tabs;<commit_msg>workaround for missing favIconUrl property<commit_after>(function() {
    var container = document.getElementById('container'),
        filter = document.getElementById('filter-input'),
        closedTabs;

    function getList(tabs) {
        return tabs.map(function (session) {
            var faviconUrl = session.tab.favIconUrl,
                matches;
            if (!faviconUrl) {
                matches = /^http(?:s)?:\/\/[^\/]+/.exec(session.tab.url);
                faviconUrl = matches && matches.length ? matches[0] + '/favicon.ico' : 'media/icon_16.png';
            }
            return '<a class="li" data-id="' + session.tab.sessionId + '" title="' + session.tab.url +
                '"><div class="item"><img src="' + faviconUrl +
                '"/><span>' + session.tab.title + '</span></div></a>';
        }).join('');
    }

    function render(tabs) {
        if (tabs.length) {
            container.innerHTML = getList(tabs);
            bindClicks();
        } else {
            container.innerHTML = '<div class="li"><span>Nothing found</span></div>'
        }
    }

    chrome.runtime.getBackgroundPage(function(bg) {
        bg.getClosedTabs(function (tabs) {
            closedTabs = tabs;
{'fraction_non_alphanumeric': 0.1669750231267345, 'fraction_numerical': 0.002312673450508788, 'mean_word_length': 2.13933236574746, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '1826041', 'n_tokens_mistral': 635, 'n_tokens_neox': 598, 'n_words': 107}