<commit_before>/*
 * Creates a siteRow which can be parsed
 *
 * @param site  {object} {title, pubdate, link, description}
 *     
 *
 */
var siteRow = function(sites) {
    var div = document.createElement('div');
    div.className = 'hyperlinkParse';
    if(sites.title !== undefined) {
        var domain = sites.link.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
        div.innerHTML = sites.title + ' (<a href="' + sites.link + '">' + domain[1] + '</a>)';
        sites = [sites];
    } else {
        div.textContent = '>- rip All Sites -<';
    }
    div.onclick = (function(sites) {
        return function() {
            msg.set('parsing site...');
            $.ajax({
                url: '/sites/links',
                type: 'post',
                data: {sites:sites},
                cache: false,
                dataType: 'json'
            }).done(function(data){
                msg.set('found ' + data.length + ' links.')
                makeTableChecked(data);
                $('#content').tabs({
                    active: 1
                }); // Jump to tab 1 > links; tabs start with 0 = first tab
            }).fail(function(){
                msg.set('Error when checking links!');
            });
        };
    })(sites);
    return div;
};


<commit_msg>cleanup code<commit_after>/*
 * Creates a siteRow which can be parsed
 *
 * @param site  {object} {title, pubdate, link, description}
 *     
 *
 */
var siteRow = function(sites) {
    var div = document.createElement('div');
    div.className = 'hyperlinkParse';
    if(sites.title !== undefined) {
        var domain = sites.link.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
        div.innerHTML = sites.title + ' (<a href="' + sites.link + '">' + domain[1] + '</a>)';
        sites = [sites];
    } else {
        div.textContent = '>- rip All Sites -<';
    }
    div.onclick = (function(sites) {
        return function() {
            msg.set('parsing site...');
            $.ajax({
                url: '/site/links',
                type: 'post',
                data: {sites:sites},
                cache: false,
                dataType: 'json'
            }).done(function(data){
                msg.set('found ' + data.length + ' links.')
                makeTableChecked(data);
                $('#content').tabs({
                    active: 1
                }); // Jump to tab 1 > links; tabs start with 0 = first tab
            }).fail(function(){
                msg.set('Error when checking links!');
            });
        };
    })(sites);
    return div;
};



{'fraction_non_alphanumeric': 0.18076027928626842, 'fraction_numerical': 0.0031031807602792862, 'mean_word_length': 1.5534653465346535, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '2994335', 'n_tokens_mistral': 793, 'n_tokens_neox': 728, 'n_words': 173}