<commit_before>function NameController($window, $timeout, ShareBandNameService, FormDataService, SocialMediaShareService) {
  var ctrl = this;

  ctrl.loadingPage = true;
  ctrl.bandName = ShareBandNameService;

  ctrl.removeClassFromElement = (className, element) => {
    let elem = angular.element(document.querySelector(element));
    elem.removeClass(className);    
  }

  ctrl.hideLoadingPage = () => {
    ctrl.removeClassFromElement('bg-color-loading', 'body');
    ctrl.removeClassFromElement('bg-img-loading', '.bg-img');
    ctrl.loadingPage = false;
  }

  ctrl.resetBandName = function() {
    ctrl.bandName.name = '';
    ctrl.bandName.genre_id = '';
    FormDataService.formData = {};    
  }

  ctrl.twtrBandName = () => {
    return ctrl.bandName.name.replace(/\s/g, '+');    
  }
  
  ctrl.fbFeed = SocialMediaShareService.fbFeed;
  ctrl.twtrTweet = SocialMediaShareService.twtrTweet;

  SocialMediaShareService.fbSDK;

  $timeout(ctrl.hideLoadingPage, 3000);   
  
}

angular
  .module('app')
  .controller('NameController', NameController);<commit_msg>add methods to change font-family depending on genre<commit_after>function NameController($window, $timeout, ShareBandNameService, FormDataService, SocialMediaShareService) {
  var ctrl = this;

  var fontClasses = [
    'genre-font-pop',
    'genre-font-indie',
    'genre-font-punk',
    'genre-font-rock',
    'genre-font-metal',
    'genre-font-jazz',
    'genre-font-country'
  ];

  function getFontClass(i) {
    return fontClasses[i-1];
  }

  ctrl.loadingPage = true;
  ctrl.bandName = ShareBandNameService;

  ctrl.removeClassFromElement = (className, element) => {
    let elem = angular.element(document.querySelector(element));
    elem.removeClass(className);
  }

  ctrl.addClassToElement = (className, element) => {
    let elem = angular.element(document.querySelector(element));
    elem.addClass(className);
  }

  ctrl.hideLoadingPage = () => {
    ctrl.removeClassFromElement('bg-color-loading', 'body');
    ctrl.removeClassFromElement('bg-img-loading', '.bg-img');
    ctrl.loadingPage = false;    
  }

  ctrl.resetBandName = function() {
    ctrl.bandName.name = '';
    ctrl.bandName.genre_id = '';
    FormDataService.formData = {};    
  }

  ctrl.twtrBandName = () => {
    return ctrl.bandName.name.replace(/\s/g, '+');    
  }
  
  ctrl.fbFeed = SocialMediaShareService.fbFeed;
  ctrl.twtrTweet = SocialMediaShareService.twtrTweet;

  SocialMediaShareService.fbSDK;

  $timeout(ctrl.hideLoadingPage, 3000).then( () => {
    ctrl.addClassToElement(getFontClass(ctrl.bandName.genre_id), 'h1#band-name')
  });
  
}

angular
  .module('app')
  .controller('NameController', NameController);
{'fraction_non_alphanumeric': 0.14386617100371749, 'fraction_numerical': 0.0037174721189591076, 'mean_word_length': 3.848648648648649, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2492563', 'n_tokens_mistral': 882, 'n_tokens_neox': 861, 'n_words': 120}