<commit_before>//js file for controlling votepage

Template.quickVote.events({
    'click #c-register': function (evt, template) {
        // ...username holds voterid
        usern = template.find("#c-username").value
        if (Meteor.user().username ==usern && usern != undefined && quickvote.find({username:usern})?(quickvote.find({username:usern}).count()==0):true){

            quickvote.insert({username:usern, votecount:0 });
            alert("You are now registered as a candidate!");
            console.log("You are now registered as a candidate!")


        }
        else{

            alert("You are already registered")
            console.log("registration Error: already registered")
        }
    }
});<commit_msg>silly fix on empty user reg<commit_after>//js file for controlling votepage

Template.quickVote.events({
    'click #c-register': function (evt, template) {
        // ...username holds voterid
        usern = template.find("#c-username").value
        if (Meteor.user().username ==usern && usern != undefined && usern!="" && quickvote.find({username:usern})?(quickvote.find({username:usern}).count()==0):true){

            quickvote.insert({username:usern, votecount:0 });
            alert("You are now registered as a candidate!");
            console.log("You are now registered as a candidate!")


        }
        else{

            alert("You are already registered")
            console.log("registration Error: already registered")
        }
    }
});
{'fraction_non_alphanumeric': 0.14562458249833, 'fraction_numerical': 0.0026720106880427524, 'mean_word_length': 2.689655172413793, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3702811', 'n_tokens_mistral': 410, 'n_tokens_neox': 399, 'n_words': 100}