<commit_before>'use strict';

function init() {
  // Disable drag + drop event for document.
  document.addEventListener('dragover', function(event) {
    event.preventDefault();
    return false;
  }, false);

  document.addEventListener('drop', function(event) {
    event.preventDefault();
    return false;
  }, false);
  // Drag and Drop holder.
  const holder = document.getElementById('holder');
  // Placehold text in holder.
  const dragText = document.getElementById('drag-text');

  holder.ondragover = function() {
    return false;
  };

  holder.ondragleave = holder.ondragend = function() {
    return false;
  };

  holder.ondrop = function(e) {
    e.preventDefault();
    const file = e.dataTransfer.files[0];
    console.log('File you dragged here is', file.path);

    // Remove exitng video.
    const existingVideo = holder.getElementsByTagName('video')[0];
    if (existingVideo) { existingVideo.remove(); };

    dragText.className += ' hidden';

    const video = document.createElement("video");
    video.setAttribute('controls', '');
    video.setAttribute("width", '100%');
    video.setAttribute('height', '100%');
    const source = document.createElement("source");
    source.setAttribute('src', file.path);
    video.appendChild(source);
    holder.appendChild(video);
    return false;
  };
};<commit_msg>Add functions to be filled later<commit_after>'use strict';

const videoClip = require('./movie.js');

function bindUI() {
  // Bind options to videoClip file.
}

function reset() {
  // Reset options to values of video file.
}

function init() {
  // Disable drag + drop event for document.
  document.addEventListener('dragover', function(event) {
    event.preventDefault();
    return false;
  }, false);
  document.addEventListener('drop', function(event) {
    event.preventDefault();
    return false;
  }, false);
  // Drag and Drop holder.
  const holder = document.getElementById('holder');
  // Placehold text in holder.
  const dragText = document.getElementById('drag-text');

  holder.ondragover = function() {
    return false;
  };

  holder.ondragleave = holder.ondragend = function() {
    return false;
  };

  holder.ondrop = function(e) {
    e.preventDefault();
    const file = e.dataTransfer.files[0];
    console.log('File you dragged here is', file.path);
    videoClip.video = file.path;
    // Remove exitng video.
    const existingVideo = holder.getElementsByTagName('video')[0];
    if (existingVideo) { existingVideo.remove(); };

    dragText.className += ' hidden';

    const video = document.createElement("video");
    video.setAttribute('controls', '');
    video.setAttribute("width", '100%');
    video.setAttribute('height', '100%');
    const source = document.createElement("source");
    source.setAttribute('src', file.path);
    video.appendChild(source);
    holder.appendChild(video);
    return true;
  };
}
{'fraction_non_alphanumeric': 0.14709944751381215, 'fraction_numerical': 0.0055248618784530384, 'mean_word_length': 3.6801292407108237, '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': '269348', 'n_tokens_mistral': 823, 'n_tokens_neox': 817, 'n_words': 196}