<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 Stream = {
  initialize: function() {
    var $stream = $(".stream");
    var $publisher = $("#publisher");

    Diaspora.widgets.timeago.updateTimeAgo();
    $stream.not(".show").delegate("a.show_post_comments", "click", Stream.toggleComments);
    //audio linx
    $(".stream a[target='_blank']").each(function(){
      if($(this).attr('href').match(/\.mp3$|\.ogg$/)) {
        $(this).parent().html("<audio preload='none' src='" + this.href + "' controls='controls'>mom</audio>");}
    });


    // comment link form focus
    $stream.delegate(".focus_comment_textarea", "click", function(e){
      Stream.focusNewComment($(this), e);
    });

    $stream.delegate("textarea.comment_box", "focus", function(evt) {
      var commentBox = $(this);
      commentBox
        .attr('rows',2)
        .parent().parent()
          .addClass('open');
    });

    $stream.delegate("textarea.comment_box", "blur", function(evt) {<commit_msg>make sure audio player does not delete sm text<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 Stream = {
  initialize: function() {
    var $stream = $(".stream");
    var $publisher = $("#publisher");

    Diaspora.widgets.timeago.updateTimeAgo();
    $stream.not(".show").delegate("a.show_post_comments", "click", Stream.toggleComments);
    //audio linx
    $(".stream a[target='_blank']").each(function(){
      if($(this).attr('href').match(/\.mp3$|\.ogg$/)) {
        $(this).hide();
        $(this).parent().append("<audio preload='none' src='" + this.href + "' controls='controls'>mom</audio>");}
    });


    // comment link form focus
    $stream.delegate(".focus_comment_textarea", "click", function(e){
      Stream.focusNewComment($(this), e);
    });

    $stream.delegate("textarea.comment_box", "focus", function(evt) {
      var commentBox = $(this);
      commentBox
        .attr('rows',2)
        .parent().parent()
          .addClass('open');
    });

    $stream.delegate("textarea.comment_box", "blur", function(evt) {
{'fraction_non_alphanumeric': 0.19336534264513314, 'fraction_numerical': 0.006110868616324749, 'mean_word_length': 3.2523191094619666, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5899895', 'n_tokens_mistral': 730, 'n_tokens_neox': 695, 'n_words': 149}