<commit_before>function Tags() {
    var self = this;

	self.initialized = false;

    self.init = function() {
        self.initialized = true;

        $('#tags .btn.add').click(function() {
        var $title = $('#tags .add input[name=title]'),
            title = $title.val();
        
        if (!title) {
            alert('A name needs to be provided');
            return;
        }
        
        var params = {
            title: title
        };

        $.post('/tags', params).success(function(data) {
            console.log('tag added', data);
        });
    });
    }
}<commit_msg>Added loadTags and fixed formatting to Tags.js<commit_after>function Tags() {
    var self = this;

	self.initialized = false;
    self.$view = $("#tags");
    self.$ul = self.$view.find('> ul');

    self.init = function() {
        $('#tags .btn.add').click(function() {
            var $title = $('#tags .add input[name=title]'),
                title = $title.val();
            
            if (!title) {
                alert('A name needs to be provided');
                return;
            }
            
            var params = {
                title: title
            };

            $.post('/tags', params).success(function(data) {
                console.log('tag added', data);
            });
        });

        self.initialized = true;
        self.loadTags();
    }

    self.loadTags = function() {
        $.getJSON('/tags').success(function(data) {
            console.log(data);
            
            $.each(data, function(i, item) {
                var $view = HTML.createTag(item);
                self.$ul.append($view);
            });
        });
    };
}
{'fraction_non_alphanumeric': 0.1577082102776137, 'fraction_numerical': 0.0, 'mean_word_length': 1.3892806770098731, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5670051', 'n_tokens_mistral': 472, 'n_tokens_neox': 459, 'n_words': 99}