(function removeZeroCategoriesFromCoverOverbudgeting() {

  if (typeof Em !== 'undefined' && typeof Ember !== 'undefined' && typeof $ !== 'undefined') {
    var coverOverbudgetingCategories = $( ".modal-budget-overspending .options-shown .ynab-select-options" ).children('li');
    coverOverbudgetingCategories.each(function(i) {
      var t = $(this).text(); // Category balance text.
      var categoryBalance = parseInt(t.substr(t.indexOf(":"), t.length).replace(/[^\d-]/g, ''));
      if (categoryBalance <= 0) {
        $(this).remove();
      }
    });
  }

  setTimeout(removeZeroCategoriesFromCoverOverbudgeting, 50);
})();

(function removeZeroCategoriesFromCoverOverbudgeting() {

  if (typeof Em !== 'undefined' && typeof Ember !== 'undefined' && typeof $ !== 'undefined') {
    var coverOverbudgetingCategories = $( "fieldset>.options-shown>.ynab-select-options" ).children('li');
    coverOverbudgetingCategories.each(function(i) {
      var t = $(this).text(); // Category balance text.
      var categoryBalance = parseInt(t.substr(t.length - t.indexOf(":") + 2).replace( /\D/g, ''))
      if (categoryBalance <= 0) {
        $(this).remove();
      }
    });
  }

  setTimeout(removeZeroCategoriesFromCoverOverbudgeting, 50);
})();

Revert "Added a more reliable css selector and fixed parsing bug"
Revert "Added a more reliable css selector and fixed parsing bug"

This reverts commit 19b98b00ca4fdc04f650570062de16c771063741.
