<commit_before>var TogglButton = {
  $user: null,
  $apiUrl: "https://www.toggl.com/api/v7",
  $newApiUrl: "https://new.toggl.com/api/v8",
  $curEntryId: null,
  $triedAlternative: false,

  fetchUser: function (apiUrl, callback) {
    GM_xmlhttpRequest({
      method: "GET",
      url: apiUrl + "/me?with_related_data=true",
      onload: function(result) {
        if (result.status === 200) {
          var clientMap = {}, projectMap = {}, resp = JSON.parse(result.responseText);
          clientMap[0] = 'No Client';
          if (resp.data.clients) {
            resp.data.clients.forEach(function (client) {
              clientMap[client.id] = client.name;
            });
          }
          if (resp.data.projects) {
            resp.data.projects.forEach(function (project) {
              if (clientMap[project.cid] == undefined) {
                project.cid = 0;
              }
              projectMap[project.id] = {
                id: project.id,
                cid: project.cid,
                name: project.name
              };<commit_msg>#2 Ignore archived projects<commit_after>var TogglButton = {
  $user: null,
  $apiUrl: "https://www.toggl.com/api/v7",
  $newApiUrl: "https://new.toggl.com/api/v8",
  $curEntryId: null,
  $triedAlternative: false,

  fetchUser: function (apiUrl, callback) {
    GM_xmlhttpRequest({
      method: "GET",
      url: apiUrl + "/me?with_related_data=true",
      onload: function(result) {
        if (result.status === 200) {
          var clientMap = {}, projectMap = {}, resp = JSON.parse(result.responseText);
          clientMap[0] = 'No Client';
          if (resp.data.clients) {
            resp.data.clients.forEach(function (client) {
              clientMap[client.id] = client.name;
            });
          }
          if (resp.data.projects) {
            resp.data.projects.forEach(function (project) {
              if (clientMap[project.cid] == undefined) {
                project.cid = 0;
              }
              if (project.active) {
                projectMap[project.id] = {
                  id: project.id,
                  cid: project.cid,
                  name: project.name
                };
              }
{'fraction_non_alphanumeric': 0.13780598368087035, 'fraction_numerical': 0.006799637352674524, 'mean_word_length': 1.734820322180917, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '455485', 'n_tokens_mistral': 691, 'n_tokens_neox': 674, 'n_words': 119}