<commit_before>'use strict';
var React = require('react/addons');
var DownloadUI = React.createFactory(require('./DownloadUI'));
var currentSearch;
var shouldBuild;

if (location.hash.length || location.search.length) {
  var str     = location.hash || location.search;
  var baseUrl = [location.protocol, '//', location.host, location.pathname].join('');
  var query   = str.replace('#', '?');
  var queries = _.chain(query.replace(/^\?/, '').split('&'))
    .map(function(query) {
      return query.split('-');
    })
    .flatten()
    .value();

  if (queries.length) {
    shouldBuild = true;

    queries.map(function(query) {
      var searchResult = query.match(/q=(.*)/);
      if (searchResult) {
        currentSearch = unescape(searchResult[1]);
      } else {
        var matches = function(obj) {
          var prop = obj.property;
          if (_.isArray(prop)) {
            prop = prop.join('_');
          }

          if (query === prop.toLowerCase()
             || query === 'shiv' && prop === 'html5shiv'
             || query === 'printshiv' && prop === 'html5printshiv'
             || query === 'do_not_use_in_production') {
            obj.checked = true;<commit_msg>Preserve old build urls that contain aliased names<commit_after>'use strict';
var React = require('react/addons');
var DownloadUI = React.createFactory(require('./DownloadUI'));
var currentSearch;
var shouldBuild;

if (location.hash.length || location.search.length) {
  var str     = location.hash || location.search;
  var baseUrl = [location.protocol, '//', location.host, location.pathname].join('');
  var query   = str.replace('#', '?');
  var queries = _.chain(query.replace(/^\?/, '').split('&'))
    .map(function(query) {
      return query.split('-');
    })
    .flatten()
    .value();

  if (queries.length) {
    shouldBuild = true;

    queries.map(function(query) {
      var searchResult = query.match(/q=(.*)/);
      if (searchResult) {
        currentSearch = unescape(searchResult[1]);
      } else {
        var matches = function(obj) {
          var prop = obj.property;
          if (_.isArray(prop)) {
            prop = prop.join('_');
          }

          if (query === prop.toLowerCase()
             || query === 'shiv' && prop === 'html5shiv'
             || query === 'printshiv' && prop === 'html5printshiv'
             || obj.builderAliases && _.contains(obj.builderAliases, query)
             || query === 'do_not_use_in_production') {
            obj.checked = true;
{'fraction_non_alphanumeric': 0.1767293082766893, 'fraction_numerical': 0.0023990403838464614, 'mean_word_length': 2.5388967468175387, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2335747', 'n_tokens_mistral': 751, 'n_tokens_neox': 749, 'n_words': 157}