<commit_before>/**
 * Copyright (c) 2017 SkyzohKey
 * 
 * This software is released under the MIT License.
 * https://opensource.org/licenses/MIT
 */

(function(window, document) {

  var App = (function() {
    this._scrollSpy = new ScrollSpy();
    this._scrollSpy.init();

    this.header          = document.querySelector('#site-header') || null;
    this.title           = document.querySelector('.page-title') || null;
    this.secondNav       = document.querySelector('nav.second-nav') || null;
    this.featureMessages = document.querySelector('#messages') || null;
    this.featureAudio    = document.querySelector('#audio-calls') || null;
    this.featureVideo    = document.querySelector('#video-calls') || null;
    this.featureFiles    = document.querySelector('#file-transfers') || null;

    this.secondNavLinks = document.querySelectorAll('#features-nav a') || null;
    this.linkMessages    = document.querySelector('#link-messages') || null;
    this.linkAudio       = document.querySelector('#link-audio-calls') || null;
    this.linkVideo       = document.querySelector('#link-video-calls') || null;
    this.linkFiles       = document.querySelector('#link-file-transfers') || null;
  });

  App.prototype.init = function() {
    console.log(this.header);
    console.log(this.secondNav);

    this.enableScrollSpy();
    this.addEvents();
  }

  App.prototype.enableScrollSpy = function() {
    if (this.secondNav == null && this.header != null) {
      this._scrollSpy.spyOn(this.header);
    }

    if (this.secondNav != null) {
      this._scrollSpy.spyOn(this.secondNav);
      this._scrollSpy.spyOn(this.featureMessages);
      this._scrollSpy.spyOn(this.featureAudio);
      this._scrollSpy.spyOn(this.featureVideo);
      this._scrollSpy.spyOn(this.featureFiles);
    }
  };

  App.prototype.addEvents = function() {
    /* Element is not visible anymore on the screen. */
    addEvent(document, 'ScrollSpyOutOfSight', function (e) {
      var scrollTop = document.documentElement.scrollTop ?<commit_msg>Remove useless console.log()'s<commit_after>/**
 * Copyright (c) 2017 SkyzohKey
 *
 * This software is released under the MIT License.
 * https://opensource.org/licenses/MIT
 */

(function(window, document) {

  var App = (function() {
    this._scrollSpy = new ScrollSpy();
    this._scrollSpy.init();

    this.header          = document.querySelector('#site-header') || null;
    this.title           = document.querySelector('.page-title') || null;
    this.secondNav       = document.querySelector('nav.second-nav') || null;
    this.featureMessages = document.querySelector('#messages') || null;
    this.featureAudio    = document.querySelector('#audio-calls') || null;
    this.featureVideo    = document.querySelector('#video-calls') || null;
    this.featureFiles    = document.querySelector('#file-transfers') || null;

    this.secondNavLinks = document.querySelectorAll('#features-nav a') || null;
    this.linkMessages    = document.querySelector('#link-messages') || null;
    this.linkAudio       = document.querySelector('#link-audio-calls') || null;
    this.linkVideo       = document.querySelector('#link-video-calls') || null;
    this.linkFiles       = document.querySelector('#link-file-transfers') || null;
  });

  App.prototype.init = function() {
    this.enableScrollSpy();
    this.addEvents();
  }

  App.prototype.enableScrollSpy = function() {
    if (this.secondNav == null && this.header != null) {
      this._scrollSpy.spyOn(this.header);
    }

    if (this.secondNav != null) {
      this._scrollSpy.spyOn(this.secondNav);
      this._scrollSpy.spyOn(this.featureMessages);
      this._scrollSpy.spyOn(this.featureAudio);
      this._scrollSpy.spyOn(this.featureVideo);
      this._scrollSpy.spyOn(this.featureFiles);
    }
  };

  App.prototype.addEvents = function() {
    /* Element is not visible anymore on the screen. */
    addEvent(document, 'ScrollSpyOutOfSight', function (e) {
      var scrollTop = document.documentElement.scrollTop ?
{'fraction_non_alphanumeric': 0.14840637450199204, 'fraction_numerical': 0.00199203187250996, 'mean_word_length': 3.3853711790393013, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5502383', 'n_tokens_mistral': 1197, 'n_tokens_neox': 1202, 'n_words': 198}