<commit_before>var app;
var specialApps = {
    "allApps" : "allApps",
    "publish" : "publish",
    "viewAll" : "viewAll",
    "exploreApps" : "exploreApps",
    "registryApp" : "registryApp"
};

var iframeLoaded = function() {};

$(document).ready(function() {
  app = window.location.hash.substring(1) || $('.installed-apps a').data('id') || 'contactsviewer';
  loadApp();

  $('.iframeLink').click(function() {
    app = $(this).data('id');
    loadApp();
    return false;
  });

  $('.oauthLink').click(function() {
    var popup = window.open($(this).attr('href'), "account", "width=" + $(this).data('width') + ",height=" + $(this).data('height') + ",status=no,scrollbars=no,resizable=no");
    popup.focus();
    return false;
  });

  $('.your-apps').click(function() {
    $('.blue').removeClass('blue');
    $(this).addClass('blue');
    if (document.getElementById('appFrame').contentWindow.filterItems) {
      document.getElementById('appFrame').contentWindow.filterItems($(this).attr('id'));
    }
    $('.sidenav-items input').attr('checked', false)
  });

  $('.sidenav-items input').click(function() {
    var checked = $('.sidenav-items input:checked');
    if (checked.length == 0) {
      $('.your-apps').click();
    } else {
      $('.your-apps').removeClass('blue');
      app = "exploreApps&filter";
      var types = [];
      var services = [];
      $('#types').find(checked).each(function(i, elem) {
        app += "&types[]=" + $(elem).attr('id');
      });
      $('#services').find(checked).each(function(i, elem) {
        app += "&services[]=" + $(elem).attr('id');
      });
      loadApp();
    }
  });
});

var loadApp = function(callback) {
  var appUrl = app;
  var params = '';
  if (app.indexOf('&') != -1) {
    appUrl = app.substring(0, app.indexOf('&'));
    params = app.substring(app.indexOf('&') + 1);
  }
  if (callback) {
    iframeLoaded = callback;
  } else {
    iframeLoaded = function() {};
  }
  $('.app-details').hide();
  $('.iframeLink,.your-apps').removeClass('blue');
  window.location.hash = app;
  if (specialApps[appUrl]) {
    $("#appFrame")[0].contentWindow.location.replace(specialApps[appUrl] + '?params=' + params);
  } else {
    $.get('clickapp/' + appUrl, function(e) {});
    $("#appFrame")[0].contentWindow.location.replace('/Me/' + appUrl);
  }
  $('.iframeLink[data-id="' + app + '"]').addClass('blue').parent('p').siblings().show();
  if (params.indexOf('filter') === 0) {
    var boxes = params.split('&');
    for (var i = 0; i < boxes.length; i++) {
      var item = boxes[i].split('=');
      if (item.length > 1) {
        $('#' + item[1]).attr('checked', true);
      }
    }
  }
};

var syncletInstalled = function(provider) {
  if (provider === 'github') {
    $('.your-apps').show();
  }
  var link = $('.oauthLink[data-provider="' + provider + '"]');
  link.children('img').addClass('installed').appendTo('.sidenav-items.synclets');
  link.remove();
};<commit_msg>ensure all the checkboxes are unchecked when on the featured page<commit_after>var app;
var specialApps = {
    "allApps" : "allApps",
    "publish" : "publish",
    "viewAll" : "viewAll",
    "exploreApps" : "exploreApps",
    "registryApp" : "registryApp"
};

var iframeLoaded = function() {};

$(document).ready(function() {
  app = window.location.hash.substring(1) || $('.installed-apps a').data('id') || 'contactsviewer';
  loadApp();

  $('.iframeLink').click(function() {
    app = $(this).data('id');
    loadApp();
    return false;
  });

  $('.oauthLink').click(function() {
    var popup = window.open($(this).attr('href'), "account", "width=" + $(this).data('width') + ",height=" + $(this).data('height') + ",status=no,scrollbars=no,resizable=no");
    popup.focus();
    return false;
  });

  $('.your-apps').click(function() {
    $('.blue').removeClass('blue');
    $(this).addClass('blue');
    if (document.getElementById('appFrame').contentWindow.filterItems) {
      document.getElementById('appFrame').contentWindow.filterItems($(this).attr('id'));
    }
  });

  $('.sidenav-items input').click(function() {
    var checked = $('.sidenav-items input:checked');
    if (checked.length == 0) {
      $('.your-apps').click();
    } else {
      $('.your-apps').removeClass('blue');
      app = "exploreApps&filter";
      var types = [];
      var services = [];
      $('#types').find(checked).each(function(i, elem) {
        app += "&types[]=" + $(elem).attr('id');
      });
      $('#services').find(checked).each(function(i, elem) {
        app += "&services[]=" + $(elem).attr('id');
      });
      loadApp();
    }
  });
});

var loadApp = function(callback) {
  var appUrl = app;
  var params = '';
  if (app.indexOf('&') != -1) {
    appUrl = app.substring(0, app.indexOf('&'));
    params = app.substring(app.indexOf('&') + 1);
  }
  if (callback) {
    iframeLoaded = callback;
  } else {
    iframeLoaded = function() {};
  }
  $('.app-details').hide();
  $('.iframeLink,.your-apps').removeClass('blue');
  window.location.hash = app;
  if (specialApps[appUrl]) {
    $("#appFrame")[0].contentWindow.location.replace(specialApps[appUrl] + '?params=' + params);
  } else {
    $.get('clickapp/' + appUrl, function(e) {});
    $("#appFrame")[0].contentWindow.location.replace('/Me/' + appUrl);
  }
  $('.iframeLink[data-id="' + app + '"]').addClass('blue').parent('p').siblings().show();
  $('.sidenav-items input').attr('checked', false)
  if (params.indexOf('filter') === 0) {
    var boxes = params.split('&');
    for (var i = 0; i < boxes.length; i++) {
      var item = boxes[i].split('=');
      if (item.length > 1) {
        $('#' + item[1]).attr('checked', true);
      }
    }
  }
};

var syncletInstalled = function(provider) {
  if (provider === 'github') {
    $('.your-apps').show();
  }
  var link = $('.oauthLink[data-provider="' + provider + '"]');
  link.children('img').addClass('installed').appendTo('.sidenav-items.synclets');
  link.remove();
};
{'fraction_non_alphanumeric': 0.24327956989247312, 'fraction_numerical': 0.003696236559139785, 'mean_word_length': 3.459176029962547, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '511346', 'n_tokens_mistral': 2023, 'n_tokens_neox': 1986, 'n_words': 324}