<commit_before>/*   Copyright (c) 2010, Diaspora Inc.  This file is
*   licensed under the Affero General Public License version 3 or later.  See
*   the COPYRIGHT file.
*/
var View = {
  initialize: function() {
    /* Buttons */
    $("input:submit").addClass("button");

    /* Tooltips */
    this.tooltips.bindAll();

    /* In field labels */
    $("label").inFieldLabels();
    $(document).bind('afterReveal.facebox', function() {
      jQuery("#facebox label").inFieldLabels();
    });

    Diaspora.widgets.subscribe("stream/scrolled", function() {
      new_elements = Array.prototype.slice.call(arguments,1)
      $(new_elements).find('label').inFieldLabels();
    });

    Diaspora.widgets.subscribe("stream/reloaded", function() {
      $('#main_stream label').inFieldLabels();
    });

    /*scroll to top */
     jQuery(window).scroll(function(){
      if(jQuery(window).scrollTop() > 1000){
        // show back to top
        jQuery('#back-to-top').stop().animate({opacity: .5});
      }
      else{
        // hide back to top
        jQuery('#back-to-top').stop().animate({opacity: 0});
      }
    }); 

    /* Showing debug messages  */
    $(this.debug.selector)
      .click(this.debug.click);

    /* "Toggling" the search input */
    $(this.search.selector)
      .blur(this.search.blur)
      .focus(this.search.focus)
    /* Submit the form when the user hits enter */
      .keypress(this.search.keyPress);<commit_msg>smooth scroll like a smooth criminal<commit_after>/*   Copyright (c) 2010, Diaspora Inc.  This file is
*   licensed under the Affero General Public License version 3 or later.  See
*   the COPYRIGHT file.
*/
var View = {
  initialize: function() {
    /* Buttons */
    $("input:submit").addClass("button");

    /* Tooltips */
    this.tooltips.bindAll();

    /* In field labels */
    $("label").inFieldLabels();
    $(document).bind('afterReveal.facebox', function() {
      jQuery("#facebox label").inFieldLabels();
    });

    Diaspora.widgets.subscribe("stream/scrolled", function() {
      new_elements = Array.prototype.slice.call(arguments,1)
      $(new_elements).find('label').inFieldLabels();
    });

    Diaspora.widgets.subscribe("stream/reloaded", function() {
      $('#main_stream label').inFieldLabels();
    });

    /*scroll to top */
    var back_to_top = jQuery('#back-to-top');
     jQuery(window).scroll(function(){
      if(jQuery(window).scrollTop() > 1000){
        // show back to top
        back_to_top.stop().animate({opacity: .5});
      }
      else{
        // hide back to top
        back_to_top.stop().animate({opacity: 0});
      }
    }); 

    back_to_top.click(function(event){		
      event.preventDefault();
      $('html,body').animate({scrollTop:0}, 500);
    })

  /* Showing debug messages  */
    $(this.debug.selector)
      .click(this.debug.click);

    /* "Toggling" the search input */
    $(this.search.selector)
      .blur(this.search.blur)
      .focus(this.search.focus)
    /* Submit the form when the user hits enter */
      .keypress(this.search.keyPress);
{'fraction_non_alphanumeric': 0.16883963494132986, 'fraction_numerical': 0.009126466753585397, 'mean_word_length': 2.7110036275695286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7628937', 'n_tokens_mistral': 981, 'n_tokens_neox': 922, 'n_words': 189}