<commit_before>/* jshint browser: true */
/* globals ga, Raven */

const React = require("react");
const { getGitRevision } = require("../linker");
const { ProfileButton } = require("./profile");
const { addReactScripts } = require("../reactutils");
const { gaActivation } = require("../ga-activation");

class Clip extends React.Component {
  onClick(e) {
    let node = React.findDOMNode(this.refs.clipContainer);
    node.style.display = "none";
  }

  onClickComment(e) {
    e.preventDefault();
    let node = React.findDOMNode(this.refs.commentHolder),
      img = React.findDOMNode(this.refs.commentBubble);

    if (node.style.display === "none") {
      node.style.display = "inline-block";
    } else {
      node.style.display = "none";
    }
    if (img.src.indexOf("/static/img/comment-bubble-open.png") !== -1) {
      img.src = "/static/img/comment-bubble.png";
    } else {
      img.src = "/static/img/comment-bubble-open.png";
    }
  }

  render() {<commit_msg>Don't close the lightbox if the full page is not shown<commit_after>/* jshint browser: true */
/* globals ga, Raven */

const React = require("react");
const { getGitRevision } = require("../linker");
const { ProfileButton } = require("./profile");
const { addReactScripts } = require("../reactutils");
const { gaActivation } = require("../ga-activation");

class Clip extends React.Component {
  onClick(e) {
    let fullPageCheckbox = document.getElementById("full-page-checkbox");
    if (fullPageCheckbox.checked) {
      let node = React.findDOMNode(this.refs.clipContainer);
      node.style.display = "none";
    }
  }

  onClickComment(e) {
    e.preventDefault();
    let node = React.findDOMNode(this.refs.commentHolder),
      img = React.findDOMNode(this.refs.commentBubble);

    if (node.style.display === "none") {
      node.style.display = "inline-block";
    } else {
      node.style.display = "none";
    }
    if (img.src.indexOf("/static/img/comment-bubble-open.png") !== -1) {
      img.src = "/static/img/comment-bubble.png";
    } else {
      img.src = "/static/img/comment-bubble-open.png";
    }
  }

  render() {
{'fraction_non_alphanumeric': 0.17303158887317302, 'fraction_numerical': 0.000942951438000943, 'mean_word_length': 3.1203883495145632, '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': '4791480', 'n_tokens_mistral': 699, 'n_tokens_neox': 685, 'n_words': 127}