<commit_before>// *************************************
//
//   Authentication in Firebase
//   -> Form handling and data get/send
//
// *************************************

function changeSection() {

  // Get all elements that have validity classes
  var openCreateAccount = document.querySelector('#js-openCreateAccount');
  var openEvents = document.querySelector('#js-openEvents');
  var openCreateEvent = document.querySelector('#js-openCreateEvent');
  var createAccount = document.querySelector('#create-account');
  var events = document.querySelector('#events');
  var createEvent = document.querySelector('#create-event');

  // Remove showing class
  function clearShowing() {
    var isActive = document.querySelector('.is-showing');
    isActive.classList.remove('is-showing');
  };

  // Add showing class to create account
  openCreateAccount.addEventListener('click', function(event) {
    clearShowing();
    createAccount.classList.add('is-showing');
  }, false);

  // Add showing class to events
  openEvents.addEventListener('click', function(event) {
    clearShowing();
    events.classList.add('is-showing');
  }, false);

  // Add showing class to events
  openCreateEvent.addEventListener('click', function(event) {
    clearShowing();
    createEvent.classList.add('is-showing');
  }, false);

};

changeSection();



// Create an account in Firebase
function firebaseCreate(firebaseEmail, firebasePassword) {

  // Create the account
  var email = firebaseEmail;
  var password = <PASSWORD>;
  firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
    // Handle Errors here.
    var errorCode = error.code;
    var errorMessage = error.message;
    // ...
  });

};

// Watch for auth state changes
firebase.auth().onAuthStateChanged(function(user) {
  if (user) {
    document.querySelector('body').classList.add('is-signedIn');
    user.sendEmailVerification();
  } else {
    console.log("it's a ghost town up in here");
  }<commit_msg>fix: Comment out email sends, on authchange creates spam<commit_after>// *************************************
//
//   Authentication in Firebase
//   -> Form handling and data get/send
//
// *************************************

function changeSection() {

  // Get all elements that have validity classes
  var openCreateAccount = document.querySelector('#js-openCreateAccount');
  var openEvents = document.querySelector('#js-openEvents');
  var openCreateEvent = document.querySelector('#js-openCreateEvent');
  var createAccount = document.querySelector('#create-account');
  var events = document.querySelector('#events');
  var createEvent = document.querySelector('#create-event');

  // Remove showing class
  function clearShowing() {
    var isActive = document.querySelector('.is-showing');
    isActive.classList.remove('is-showing');
  };

  // Add showing class to create account
  openCreateAccount.addEventListener('click', function(event) {
    clearShowing();
    createAccount.classList.add('is-showing');
  }, false);

  // Add showing class to events
  openEvents.addEventListener('click', function(event) {
    clearShowing();
    events.classList.add('is-showing');
  }, false);

  // Add showing class to events
  openCreateEvent.addEventListener('click', function(event) {
    clearShowing();
    createEvent.classList.add('is-showing');
  }, false);

};

changeSection();



// Create an account in Firebase
function firebaseCreate(firebaseEmail, firebasePassword) {

  // Create the account
  var email = firebaseEmail;
  var password = <PASSWORD>;
  firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
    // Handle Errors here.
    var errorCode = error.code;
    var errorMessage = error.message;
    // ...
  });

};

// Watch for auth state changes
firebase.auth().onAuthStateChanged(function(user) {
  if (user) {
    document.querySelector('body').classList.add('is-signedIn');
    // user.sendEmailVerification();
  } else {
    console.log("it's a ghost town up in here");
  }
{'fraction_non_alphanumeric': 0.16822890971879625, 'fraction_numerical': 0.0, 'mean_word_length': 4.212082262210797, 'pattern_counts': {'":': 0, '<': 5, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3157197', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1101, 'n_words': 254}