<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 = {
  selector: "#main_stream",

  initialize: function() {
    Diaspora.widgets.timeago.updateTimeAgo();
    Diaspora.widgets.directionDetector.updateBinds();

    $(".status_message_delete").tipsy({
      trigger: "hover",
      gravity: "n"
    });
    //audio links
    Stream.setUpAudioLinks();
    //Stream.setUpImageLinks();

    Diaspora.widgets.subscribe("stream/scrolled", Stream.collapseText);
    Stream.collapseText('eventID', Stream.selector);
  },
  collapseText: function(){
    elements = $(Array.prototype.slice.call(arguments,1));
    // collapse long posts
    $(".content p", elements).expander({
      slicePoint: 400,
      widow: 12,
      expandText: Diaspora.widgets.i18n.t("show_more"),
      userCollapse: false
    });

    // collapse long comments
    $(".comment .content span", elements).expander({
      slicePoint: 200,
      widow: 400,
      expandText: Diaspora.widgets.i18n.t("show_more"),
      userCollapse: false
    });
  },
  initializeLives: function(){
    // reshare button action
    $(".reshare_button", this.selector).live("click", function(evt) {
      evt.preventDefault();
      var button = $(this),
        box = button.siblings(".reshare_box");

      if (box.length > 0) {
        button.toggleClass("active");<commit_msg>fix compressing of comments in stream<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 = {
  selector: "#main_stream",

  initialize: function() {
    Diaspora.widgets.timeago.updateTimeAgo();
    Diaspora.widgets.directionDetector.updateBinds();

    $(".status_message_delete").tipsy({
      trigger: "hover",
      gravity: "n"
    });
    //audio links
    Stream.setUpAudioLinks();
    //Stream.setUpImageLinks();

    Diaspora.widgets.subscribe("stream/scrolled", Stream.collapseText);
    Stream.collapseText('eventID', $(Stream.selector)[0]);
  },
  collapseText: function(){
    console.log(arguments);
    elements = $(Array.prototype.slice.call(arguments,1));
    // collapse long posts
    $(".content p", elements).expander({
      slicePoint: 400,
      widow: 12,
      expandText: Diaspora.widgets.i18n.t("show_more"),
      userCollapse: false
    });

    // collapse long comments
    $(".comment .content span", elements).expander({
      slicePoint: 200,
      widow: 18,
      expandText: Diaspora.widgets.i18n.t("show_more"),
      userCollapse: false
    });
  },
  initializeLives: function(){
    // reshare button action
    $(".reshare_button", this.selector).live("click", function(evt) {
      evt.preventDefault();
      var button = $(this),
        box = button.siblings(".reshare_box");

      if (box.length > 0) {
        button.toggleClass("active");
{'fraction_non_alphanumeric': 0.146773654296222, 'fraction_numerical': 0.014710799063858242, 'mean_word_length': 3.05420054200542, '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': '2824746', 'n_tokens_mistral': 967, 'n_tokens_neox': 903, 'n_words': 197}