<commit_before>function Dashboard() {
  var self = this;
  this.Tools = new Tools(this);
  this.Tickets = new Tickets(this);
  this.HTML = {};
  this.HTML.dashboard = this.Tools.createElement(document.body, 'div', {
        className: 'navbar navbar-inverse navbar-fixed-bottom',
        id: 'dashboard',
  });
  this.HTML.style = this.Tools.createElement(this.HTML.dashboard, 'link', {
    rel: 'stylesheet',
    type: 'text/css',
    href: 'https://rawgit.com/jamesona/SEO-Tools/master/am-dashboard/dashboard.css',
  });
  this.HTML.nav = this.Tools.createElement(this.HTML.dashboard, 'ul', {
    className: 'nav navbar-nav',
  });
  this.HTML.tools = this.Tools.createElement(this.HTML.nav, 'li', {
    innerHTML: '<a class="dropdown-toggle" data-toggle="dropdown">Tools</a>',
    className: 'dropup',
  });
  this.HTML.toolsMenu = this.Tools.createElement(this.HTML.tools, 'ul', {
    className: 'dropdown-menu',
  });
  this.HTML.todoistExport = this.Tools.createElement(this.HTML.toolsMenu, 'li', {
    innerHTML: '<a>Todoist Export</a>',
    onclick: function(){
      self.Tools.todoistExport();
    },
  });
  this.HTML.bobCalendar = this.Tools.createElement(this.HTML.toolsMenu, 'li', {
    innerHTML: '<a>BoB Calendar</a>',
    onclick: function(){
      bootbox.dialog({
        message: " ",
        title: "",
        className: "big-modal",
        buttons: {},
      });
      var modals = document.getElementsByClassName('bootbox-body'), modal = modals[modals.length-1],
      data = self.Tools.bobParse(prompt('Paste BoB data')),
      calendar = new self.Tickets.calendar(data);
      calendar.draw(modal);
    },
  });
  this.HTML.tickets = this.Tools.createElement(this.HTML.nav, 'li', {
    innerHTML: '<a class="dropdown-toggle" data-toggle="dropdown">Tickets</a>',
    className: 'dropup',
  });
  this.HTML.ticketsMenu = this.Tools.createElement(this.HTML.tickets, 'ul', {
    className: 'dropdown-menu',
  });
  this.HTML.ticketCalendar = this.Tools.createElement(this.HTML.ticketsMenu, 'li', {
    innerHTML: '<a>Calendar</a>',
    onclick: function(){
      bootbox.dialog({
        message: " ",
        title: "",
        className: "big-modal",
        buttons: {},
      });
      var modals = document.getElementsByClassName('bootbox-body'), modal = modals[modals.length-1],
      data = self.Tickets.sortTickets(),
      calendar = new self.Tickets.calendar(data);
      calendar.draw(modal);
    },
  });
  this.HTML.critical = this.Tools.createElement(this.HTML.nav, 'li', {
    innerHTML: '<a>Show Critical Count</a>',
    id: 'critical',
    onclick: function(){
      self.HTML.critical.innerHTML = self.Tickets.countCritical();
    },
  });
  window.beforeunload = function(){
    self.Tickets.tryCache();
  };
  window.onhashchange = function(){
    if (window.location.href == 'https://launchpad.boostability.com/#/customerservice/activetickets'){
      self.Tickets.tryCache();  
    }
  };
  if (localStorage.getItem('ticketCache') !== null) self.Tickets.ticketArray = JSON.parse(localStorage.getItem('ticketCache'));
}
<commit_msg>Update dashboard.js<commit_after>function Dashboard() {
  var self = this;
  this.Tools = new Tools(this);
  this.Tickets = new Tickets(this);
  this.HTML = {};
  this.HTML.dashboard = this.Tools.createElement(document.body, 'div', {
        className: 'navbar navbar-inverse navbar-fixed-bottom',
        id: 'dashboard',
  });
  this.HTML.style = this.Tools.createElement(this.HTML.dashboard, 'link', {
    rel: 'stylesheet',
    type: 'text/css',
    href: 'https://rawgit.com/jamesona/SEO-Tools/master/am-dashboard/dashboard.css',
  });
  this.HTML.nav = this.Tools.createElement(this.HTML.dashboard, 'ul', {
    className: 'nav navbar-nav',
  });
  this.HTML.tools = this.Tools.createElement(this.HTML.nav, 'li', {
    innerHTML: '<a class="dropdown-toggle" data-toggle="dropdown">Tools</a>',
    className: 'dropup',
  });
  this.HTML.toolsMenu = this.Tools.createElement(this.HTML.tools, 'ul', {
    className: 'dropdown-menu',
  });
  this.HTML.todoistExport = this.Tools.createElement(this.HTML.toolsMenu, 'li', {
    innerHTML: '<a>Todoist Export</a>',
    onclick: function(){
      self.Tools.todoistExport();
    },
  });
  this.HTML.bobCalendar = this.Tools.createElement(this.HTML.toolsMenu, 'li', {
    innerHTML: '<a>BoB Calendar</a>',
    onclick: function(){
      bootbox.dialog({
        message: " ",
        title: "",
        className: "big-modal",
        buttons: {},
      });
      var modals = document.getElementsByClassName('bootbox-body'), modal = modals[modals.length-1],
      data = self.Tools.bobParse(prompt('Paste BoB data')),
      calendar = new self.Tickets.calendar(data);
      calendar.draw(modal);
    },
  });
  this.HTML.tickets = this.Tools.createElement(this.HTML.nav, 'li', {
    innerHTML: '<a class="dropdown-toggle" data-toggle="dropdown">Tickets</a>',
    className: 'dropup',
  });
  this.HTML.ticketsMenu = this.Tools.createElement(this.HTML.tickets, 'ul', {
    className: 'dropdown-menu',
  });
  this.HTML.ticketCalendar = this.Tools.createElement(this.HTML.ticketsMenu, 'li', {
    innerHTML: '<a>Calendar</a>',
    onclick: function(){
      bootbox.dialog({
        message: " ",
        title: "",
        className: "big-modal",
        buttons: {},
      });
      var modals = document.getElementsByClassName('bootbox-body'), modal = modals[modals.length-1],
      data = self.Tickets.sortTickets(),
      calendar = new self.Tickets.calendar(data);
      calendar.draw(modal);
    },
  });
  this.HTML.nextTicket = this.Tools.createElement(this.HTML.ticketsMenu, 'li', {
    innerHTML: 'Next Ticket',
    onclick: function(){
      self.Tools.nextTicket(self.Tickets.sortTickets()[self.Tools.today()]);
    },
  });
  this.HTML.critical = this.Tools.createElement(this.HTML.nav, 'li', {
    innerHTML: '<a>Show Critical Count</a>',
    id: 'critical',
    onclick: function(){
      self.HTML.critical.innerHTML = self.Tickets.countCritical();
    },
  });
  window.beforeunload = function(){
    self.Tickets.tryCache();
  };
  window.onhashchange = function(){
    if (window.location.href == 'https://launchpad.boostability.com/#/customerservice/activetickets'){
      self.Tickets.tryCache();  
    }
  };
  if (localStorage.getItem('ticketCache') !== null) self.Tickets.ticketArray = JSON.parse(localStorage.getItem('ticketCache'));
}

{'fraction_non_alphanumeric': 0.17731829573934837, 'fraction_numerical': 0.0006265664160401002, 'mean_word_length': 3.3732876712328768, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 4, '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': '6788435', 'n_tokens_mistral': 2070, 'n_tokens_neox': 2051, 'n_words': 312}