<commit_before>/**
 * Created by pepe on 8/9/16.
 */
var firebaseRef = new Firebase('https://coloringfun.firebaseio.com/');
var user = JSON.parse(localStorage.getItem('amazingpixel::user'))
var empty = false
var svgId;
var path;
firebaseRef.child('users').child(user.uid).child('svgImgList').once('value', function (snapshot) {
    if (snapshot.val() == null) {
        empty = true
        firebaseRef.child('svgTemplate').child('cat').once('value', function (snapshot) {
            path = snapshot.val()
            var newSvgImgRef = firebaseRef.child('svgColored').push()
            svgId = newSvgImgRef.key()
            firebaseRef.child('svgColored').child(svgId).child('svgInfo').set({});
        })
    }
});
$(document).ready(function () {
    $('#blockColoring').on('click', function () {
        if (empty) {
            firebaseRef.child('svgColored').child(svgId).child('svgInfo').set(path);

            window.location = "blockColoring.html#" + svgId
        } else {
            window.location = "blockGallery.html"

        }
    })
    
})<commit_msg>fixed logging refresh in index<commit_after>/**
 * Created by pepe on 8/9/16.
 */
var firebaseRef = new Firebase('https://coloringfun.firebaseio.com/');
var empty = false
var svgId;
var path;
$(document).ready(function () {
    $('#blockColoring').on('click', function () {
        var user = JSON.parse(localStorage.getItem('amazingpixel::user'))
        firebaseRef.child('users').child(user.uid).child('svgImgList').once('value', function (snapshot) {
            if (snapshot.val() == null) {
                empty = true
                firebaseRef.child('svgTemplate').child('cat').once('value', function (snapshot) {
                    path = snapshot.val()
                    var newSvgImgRef = firebaseRef.child('svgColored').push()
                    svgId = newSvgImgRef.key()
                    firebaseRef.child('svgColored').child(svgId).child('svgInfo').set({});
                    firebaseRef.child('svgColored').child(svgId).child('svgInfo').set(path);
                    window.location = "blockColoring.html#" + svgId
                })
            } else {

                window.location = "blockGallery.html"
            }
        });

    })

})
{'fraction_non_alphanumeric': 0.16725978647686832, 'fraction_numerical': 0.0035587188612099642, 'mean_word_length': 2.4546850998463903, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6838122', 'n_tokens_mistral': 675, 'n_tokens_neox': 664, 'n_words': 104}