<commit_before>'use strict';

/* Controllers */

angular.module('probytes.controllers', [])
  .controller('MainCtrl', function($scope, trafficData) {
    trafficData.get().then(function(data) {
      $scope.traffic = data;
    });
  })
  .controller('YearlyCtrl', function($scope, $routeParams, trafficData) {
    $scope.year = +$routeParams.year;
    $scope.$watch('traffic', function() {
      $scope.prevLink = null;
      $scope.nextLink = null;
      if (!$scope.traffic) return;

      var prevYear = $scope.year - 1,
          nextYear = $scope.year + 1;

      if ($scope.traffic.byYear[prevYear]) {
        $scope.prevLink = {
          active: true,
          year: prevYear,
        };
      }

      if ($scope.traffic.byYear[nextYear]) {
        $scope.nextLink = {
          active: true,
          year: nextYear,
        };
      }<commit_msg>set document title<commit_after>'use strict';

/* Controllers */

angular.module('probytes.controllers', [])
  .controller('MainCtrl', function($scope, trafficData) {
    trafficData.get().then(function(data) {
      $scope.traffic = data;
      document.title += ' [' + data.meta.serverName + ']';
    });
  })
  .controller('YearlyCtrl', function($scope, $routeParams, trafficData) {
    $scope.year = +$routeParams.year;
    $scope.$watch('traffic', function() {
      $scope.prevLink = null;
      $scope.nextLink = null;
      if (!$scope.traffic) return;

      var prevYear = $scope.year - 1,
          nextYear = $scope.year + 1;

      if ($scope.traffic.byYear[prevYear]) {
        $scope.prevLink = {
          active: true,
          year: prevYear,
        };
      }

      if ($scope.traffic.byYear[nextYear]) {
        $scope.nextLink = {
          active: true,
          year: nextYear,
        };
      }
{'fraction_non_alphanumeric': 0.16161616161616163, 'fraction_numerical': 0.002244668911335578, 'mean_word_length': 2.3141263940520447, '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': '2196881', 'n_tokens_mistral': 570, 'n_tokens_neox': 564, 'n_words': 96}