<commit_before>const { banner, validSpot } = require('../utils');

const apiEndPoint = '/users/spot';
const editButtonClass = '.UserIndex-editSpot';
const confirmEditTextBoxButtonClass = 'UserIndex-confirmEditTextButton';
const cancelEditTextBoxButtonClass = 'UserIndex-cancelEditTextBoxButton';
const textAreaClass = 'UserIndex-textarea';
const userIndexItemClass = 'UserIndex-userItem';

$(editButtonClass).on('click', (e) => {
  clickEventFunction(e);
});

const clickEventFunction = (e) => {
  const nameNumber = e.target.className.split(' ')[1];
  const userRowDiv = Array.from(document.getElementsByClassName(nameNumber))[0];
  const userRowChildren = userRowDiv.children;
  const spotTag = userRowChildren[1];
  const spotTagButton = spotTag.innerHTML.split(' ').slice(1);
  const spotId = spotTag.innerHTML.split(' ')[0];
  const editSpotDiv = createTextAreaWithButtons(spotId);

  userRowDiv.replaceChild(editSpotDiv, spotTag);

  const [textArea, cancelButton, confirmButton] = editSpotDiv.children;

  $(cancelButton).on('click', () => {
    userRowDiv.replaceChild(spotTag, editSpotDiv);
  });
<commit_msg>Stop destructuring cause safari<commit_after>const { banner, validSpot } = require('../utils');

const apiEndPoint = '/users/spot';
const editButtonClass = '.UserIndex-editSpot';
const confirmEditTextBoxButtonClass = 'UserIndex-confirmEditTextButton';
const cancelEditTextBoxButtonClass = 'UserIndex-cancelEditTextBoxButton';
const textAreaClass = 'UserIndex-textarea';
const userIndexItemClass = 'UserIndex-userItem';

$(editButtonClass).on('click', (e) => {
  clickEventFunction(e);
});

const clickEventFunction = (e) => {
  const nameNumber = e.target.className.split(' ')[1];
  const userRowDiv = document.getElementsByClassName(nameNumber)[0];
  const userRowChildren = userRowDiv.children;
  const spotTag = userRowChildren[1];
  const spotTagButton = spotTag.innerHTML.split(' ').slice(1);
  const spotId = spotTag.innerHTML.split(' ')[0];
  const editSpotDiv = createTextAreaWithButtons(spotId);

  userRowDiv.replaceChild(editSpotDiv, spotTag);

  const textArea = editSpotDiv.children[0], cancelButton = editSpotDiv.children[1], confirmButton = editSpotDiv.children[2];

  $(cancelButton).on('click', () => {
    userRowDiv.replaceChild(spotTag, editSpotDiv);
  });

{'fraction_non_alphanumeric': 0.13986928104575164, 'fraction_numerical': 0.005664488017429194, 'mean_word_length': 6.43042071197411, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3374386', 'n_tokens_mistral': 707, 'n_tokens_neox': 684, 'n_words': 129}