<commit_before>// Copyright (C) 2012 <NAME>.

'use strict';

(function($) {

  var checkBrowser = function() {
    var supported = true;
    var ul = $("<ul></ul>");
    if (!Modernizr.localstorage) {
      supported = false;
      $(ul).append("<li>localStorage</li>");
    }
    if (!$.support.ajax) {
      supported = false;
      $(ul).append("<li>Ajax</li>");
    }
    if (!$.support.cors) {
      supported = false;
      $(ul).append("<li>CORS</li>");
    }
    
    if (!supported) {
      $('body').empty().append("<div></div>");
      $('body div')
        .append('<h3>Your browser is too old for jskom</h3>')
        .append('Missing support for:')
        .append(ul);
      return false;
    } else {
      return true;
    }
  };

  $(function() {
    checkBrowser();
  });
})(jQuery);


angular.module('jskom.httpkom', []).
  provider('httpkom', function() {
    var _httpkomServer = null;
    
    this.setHttpkomServer = function(httpkomServer) {
      _httpkomServer = httpkomServer;
    };
    
    this.$get = [
      '$http',
      function($http) {
        return {
          getHttpkomServer: function() {
            return _httpkomServer;
          },
          
          getLyskomServers: function() {
            return $http({ method: 'get', url: _httpkomServer + '/' });
          },<commit_msg>Suggesting that private browsing is the reason for not having localstorage.<commit_after>// Copyright (C) 2012 <NAME>.

'use strict';

(function($) {

  var checkBrowser = function() {
    var supported = true;
    var ul = $("<ul></ul>");
    if (!Modernizr.localstorage) {
      supported = false;
      $(ul).append("<li>localStorage</li>");
    }
    if (!$.support.ajax) {
      supported = false;
      $(ul).append("<li>Ajax</li>");
    }
    if (!$.support.cors) {
      supported = false;
      $(ul).append("<li>CORS</li>");
    }
    
    if (!supported) {
      $('body').empty().append("<div></div>");
      $('body div')
        .append('<h3>Your browser is too old for jskom</h3>')
        .append('Missing support for:')
        .append(ul)
        .append('<p>Note: Missing support for localStorage ' +
                'can be because of private mode browsing, ' +
                'which is not supported.</p>');
      return false;
    } else {
      return true;
    }
  };

  $(function() {
    checkBrowser();
  });
})(jQuery);


angular.module('jskom.httpkom', []).
  provider('httpkom', function() {
    var _httpkomServer = null;
    
    this.setHttpkomServer = function(httpkomServer) {
      _httpkomServer = httpkomServer;
    };
    
    this.$get = [
      '$http',
      function($http) {
        return {
          getHttpkomServer: function() {
            return _httpkomServer;
          },
          
          getLyskomServers: function() {
            return $http({ method: 'get', url: _httpkomServer + '/' });
          },
{'fraction_non_alphanumeric': 0.17716262975778546, 'fraction_numerical': 0.004152249134948097, 'mean_word_length': 2.1052631578947367, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '890864', 'n_tokens_mistral': 923, 'n_tokens_neox': 898, 'n_words': 190}