<commit_before>$(document).ready(function() {
    var loading = N.getLangData().LOADING;

    $("#stdfrm").on('submit',function(event) {
      event.preventDefault();
      var s = $(this).find("input[type=submit]").eq(0);
      if(s.attr("disabled")=="disabled") return;
      w = s.width();
      s.width(s.parent().width()*.9).val(loading+'...').attr("disabled","disabled").next().hide();
      if( $("#img_ul_file").val() != "" && $("#img_ul_file").is(":visible") )
        if( !confirm(N.getLangData().IMG_UPLOADING) )
          return s.val(N.getLangData().NERDZ_IT).attr("disabled",false).width(w).next().show();
      var message = $("#frmtxt").val().tag();
      if(undefined==localStorage.getItem("no-autolink")) message = message.autoLink();
      N.json.profile.newPost({message: message, to: $(this).data('to') },function(data) {
          if(data.status == 'ok') {
              $("#showpostlist").click();
              $("#frmtxt").val('');
          }
          
          s.val(data.message);

          setTimeout(function() {
            s.val(N.getLangData().NERDZ_IT).attr("disabled",false).width(w).next().show();
          },1000);
      });
    });

    var oldPlist = "";
    $("#follow").click(function() {
        var me = $(this);
        me.html('...');
        N.json.profile.follow({id: $(this).data('id')},function(d) {
            me.html(d.message);
            me.off('click');
        });
    });

    $("#unfollow").click(function() {
        var me = $(this);
        me.html('...');
        N.json.profile.unfollow({id: $(this).data('id')},function(d) {
            me.html(d.message);
            me.off('click');
        });
    });

    $("#blacklist").click(function() {
        var me = $(this);
        var plist = $("#postlist");
        oldPlist = plist.html();
        plist.html('<form id="blfrm">'+N.getLangData().MOTIVATION+': <textarea style="width:100%; height:60px" id="blmot"></textarea><br /><input type="submit" value="Blacklist" /></form>');
        plist.on('submit','#blfrm',function(event) {
            event.preventDefault();
            me.html('...');
            N.json.profile.blacklist({
                    id: me.data('id'),
                    motivation: $("#blmot").val()
                },function(d) {
                    me.html(d.message);
                    plist.html(oldPlist);
                    me.off('click');
            });
        });
    });

    $("#unblacklist").click(function() {
        var me = $(this);
        me.html('...');
        N.json.profile.unblacklist({id: $(this).data('id')},function(d) {
            me.html(d.message);
            me.off('click');
        });
    });

    $("#profilepm").on('click',function() {
        var me = $(this), txt = N.getLangData().PM;
        if(oldPlist == "") {
            me.html('...');
            N.html.pm.getForm(function(data) {
                oldPlist = $("#fast_nerdz").html();
                $("#fast_nerdz").lenght ? $("#fast_nerdz").html(data) : $("#center_col").prepend($("<div>").attr("id","fast_pm").html(data));
                $("#to").val($("#username").html());
                $("#postlist").hide();
                TPLoad();
            });
        }
        else
        {
            me.html(txt);
            $("#fast_nerdz").lenght ? $("#fast_nerdz").html(oldPlist) : $("#fast_pm").remove();
            $("#postlist").show();
            oldPlist = "";
        }
    });

    $("#center_col").on('submit',"#convfrm",function(e) { //per i pm
        e.preventDefault();
        N.json.pm.send({
            tok: $(this).data('tok'),
            to: $("#to").val(),<commit_msg>Damn length<commit_after>$(document).ready(function() {
    var loading = N.getLangData().LOADING;

    $("#stdfrm").on('submit',function(event) {
      event.preventDefault();
      var s = $(this).find("input[type=submit]").eq(0);
      if(s.attr("disabled")=="disabled") return;
      w = s.width();
      s.width(s.parent().width()*.9).val(loading+'...').attr("disabled","disabled").next().hide();
      if( $("#img_ul_file").val() != "" && $("#img_ul_file").is(":visible") )
        if( !confirm(N.getLangData().IMG_UPLOADING) )
          return s.val(N.getLangData().NERDZ_IT).attr("disabled",false).width(w).next().show();
      var message = $("#frmtxt").val().tag();
      if(undefined==localStorage.getItem("no-autolink")) message = message.autoLink();
      N.json.profile.newPost({message: message, to: $(this).data('to') },function(data) {
          if(data.status == 'ok') {
              $("#showpostlist").click();
              $("#frmtxt").val('');
          }
          
          s.val(data.message);

          setTimeout(function() {
            s.val(N.getLangData().NERDZ_IT).attr("disabled",false).width(w).next().show();
          },1000);
      });
    });

    var oldPlist = "";
    $("#follow").click(function() {
        var me = $(this);
        me.html('...');
        N.json.profile.follow({id: $(this).data('id')},function(d) {
            me.html(d.message);
            me.off('click');
        });
    });

    $("#unfollow").click(function() {
        var me = $(this);
        me.html('...');
        N.json.profile.unfollow({id: $(this).data('id')},function(d) {
            me.html(d.message);
            me.off('click');
        });
    });

    $("#blacklist").click(function() {
        var me = $(this);
        var plist = $("#postlist");
        oldPlist = plist.html();
        plist.html('<form id="blfrm">'+N.getLangData().MOTIVATION+': <textarea style="width:100%; height:60px" id="blmot"></textarea><br /><input type="submit" value="Blacklist" /></form>');
        plist.on('submit','#blfrm',function(event) {
            event.preventDefault();
            me.html('...');
            N.json.profile.blacklist({
                    id: me.data('id'),
                    motivation: $("#blmot").val()
                },function(d) {
                    me.html(d.message);
                    plist.html(oldPlist);
                    me.off('click');
            });
        });
    });

    $("#unblacklist").click(function() {
        var me = $(this);
        me.html('...');
        N.json.profile.unblacklist({id: $(this).data('id')},function(d) {
            me.html(d.message);
            me.off('click');
        });
    });

    $("#profilepm").on('click',function() {
        var me = $(this), txt = N.getLangData().PM;
        if(oldPlist == "") {
            me.html('...');
            N.html.pm.getForm(function(data) {
                oldPlist = $("#fast_nerdz").html();
                $("#fast_nerdz").length ? $("#fast_nerdz").html(data) : $("#center_col").prepend($("<div>").attr("id","fast_pm").html(data));
                $("#to").val($("#username").html());
                $("#postlist").hide();
                TPLoad();
            });
        }
        else
        {
            me.html(txt);
            $("#fast_nerdz").lenght ? $("#fast_nerdz").html(oldPlist) : $("#fast_pm").remove();
            $("#postlist").show();
            oldPlist = "";
        }
    });

    $("#center_col").on('submit',"#convfrm",function(e) { //per i pm
        e.preventDefault();
        N.json.pm.send({
            tok: $(this).data('tok'),
            to: $("#to").val(),
{'fraction_non_alphanumeric': 0.23882643268439813, 'fraction_numerical': 0.003016177680285166, 'mean_word_length': 1.982420278004906, 'pattern_counts': {'":': 2, '<': 17, '<?xml version=': 0, '>': 17, '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': '1916456', 'n_tokens_mistral': 2287, 'n_tokens_neox': 2267, 'n_words': 268}