<commit_before>var REFRESH_INTERVAL = 10 * 1000; // 10 seconds
var HTTP_REFRESH_INTERVAL = 900;  // 900 seconds = 15 minutes
var BADGE_BACKGROUND_COLOR = '#d73f31';

var refreshTimeout;
var lastHttpRefresh = 0;

function findOurTab(callback) {
  chrome.windows.getAll({populate: true}, function(windows) {
    var foundTab, i, win;
    for (i = 0; win = windows[i]; i++) {
      var j, tab;
      for (j = 0; tab = win.tabs[j]; j++) {
        if (tab.url && /^http:\/\/(?:www\.)?theoldreader\.com/.test(tab.url)) {
          foundTab = tab;
        }
      }
    }
    callback(foundTab);
  });
}

function openOurTab() {
  findOurTab(function(tab) {
    if (tab) {
      chrome.tabs.update(tab.id, {selected: true});
    } else {
      chrome.tabs.create({url: 'http://theoldreader.com/posts/all'});
    }
  });
}

function reportError() {
  chrome.browserAction.setIcon({path: 'icon-inactive.png'});
  chrome.browserAction.setBadgeText({text: ''});
}

function updateIcon(count) {
  countInt = parseInt(count)
  if (countInt == 0) {
    count = "" 
  } else if (countInt > 999) {
    count = "999+"
  } else {
    count = countInt.toString()
  }
  chrome.browserAction.setIcon({path: 'icon-active.png'});
  chrome.browserAction.setBadgeBackgroundColor({color: BADGE_BACKGROUND_COLOR});
  chrome.browserAction.setBadgeText({text: count});
}

function parseCounters(feedData) {
  var unread_count = 0;

  var i, folder;
  for (i=0; folder=feedData.feeds[i]; i++) {
    var k, feed;
    for (k=0; feed=folder.feeds[k]; k++) {
      if (feed.unread_count) {
        unread_count += feed.unread_count;
      }
    }
  }<commit_msg>White space.<commit_after>var REFRESH_INTERVAL = 10 * 1000; // 10 seconds
var HTTP_REFRESH_INTERVAL = 900;  // 900 seconds = 15 minutes
var BADGE_BACKGROUND_COLOR = '#d73f31';

var refreshTimeout;
var lastHttpRefresh = 0;

function findOurTab(callback) {
  chrome.windows.getAll({populate: true}, function(windows) {
    var foundTab, i, win;
    for (i = 0; win = windows[i]; i++) {
      var j, tab;
      for (j = 0; tab = win.tabs[j]; j++) {
        if (tab.url && /^http:\/\/(?:www\.)?theoldreader\.com/.test(tab.url)) {
          foundTab = tab;
        }
      }
    }
    callback(foundTab);
  });
}

function openOurTab() {
  findOurTab(function(tab) {
    if (tab) {
      chrome.tabs.update(tab.id, {selected: true});
    } else {
      chrome.tabs.create({url: 'http://theoldreader.com/posts/all'});
    }
  });
}

function reportError() {
  chrome.browserAction.setIcon({path: 'icon-inactive.png'});
  chrome.browserAction.setBadgeText({text: ''});
}

function updateIcon(count) {
  countInt = parseInt(count)
  if (countInt == 0) {
    count = ""
  } else if (countInt > 999) {
    count = "999+"
  } else {
    count = countInt.toString()
  }
  chrome.browserAction.setIcon({path: 'icon-active.png'});
  chrome.browserAction.setBadgeBackgroundColor({color: BADGE_BACKGROUND_COLOR});
  chrome.browserAction.setBadgeText({text: count});
}

function parseCounters(feedData) {
  var unread_count = 0;

  var i, folder;
  for (i=0; folder=feedData.feeds[i]; i++) {
    var k, feed;
    for (k=0; feed=folder.feeds[k]; k++) {
      if (feed.unread_count) {
        unread_count += feed.unread_count;
      }
    }
  }
{'fraction_non_alphanumeric': 0.16810079901659497, 'fraction_numerical': 0.020282728948985862, 'mean_word_length': 3.1307106598984773, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '856855', 'n_tokens_mistral': 1253, 'n_tokens_neox': 1170, 'n_words': 227}