<commit_before>(function poll() {
  // Waits until an external function gives us the all clear that we can run (at /shared/main.js)
  if ( typeof ynabToolKit !== "undefined"  && ynabToolKit.actOnChangeInit === true ) {

    ynabToolKit.toggleTransactionFilters = new function()  { // Keep feature functions contained within this

	  function toggleReconciled()
	  {
		
	  }
	  
	  function toggleScheduled()
	  {
	  
	  }
	  
	  


      this.invoke = function() 
      {	
		if (/accounts/.test(window.location.href)) 
		{
			/*
				Need to improve by checking Ember for filter settings, 
				rather than checking for classes of transactions rows that change
			*/
		
			// check transaction visibility
			if ( $('.is-reconciled-row').length ) { var reconciled_visibility = 'visible'; } else { var reconciled_visibility = 'hidden'; }
			if ( $('.is-scheduled').length ) { var scheduled_visibility = 'visible'; } else { var scheduled_visibility = 'hidden'; }	
			
			// create button markup
			var button_reconciled_markup = '<button id="toggleReconciled" class="ember-view button button-toggle-'+reconciled_visibility.toLowerCase()+'">Reconciled</button>';
			var button_scheduled_markup = '<button id="toggleScheduled" class="ember-view button button-toggle-'+scheduled_visibility.toLowerCase()+'">Scheduled</button>';
			
			// insert or edit buttons
			if (! $("#toggleReconciled").length ) 
			{
				$(".accounts-toolbar .accounts-toolbar-right").append(button_scheduled_markup);		
				$(".accounts-toolbar .accounts-toolbar-right").append(button_reconciled_markup);
				$(".accounts-toolbar .accounts-toolbar-right").append('<span class="label">Show:</span>');	
			}
			else 
			{
				if (reconciled_visibility == 'visible') {
					$('#toggleReconciled').removeClass('button-toggle-hidden').addClass('button-toggle-visible');
				}
				else {
					$('#toggleReconciled').addClass('button-toggle-hidden').removeClass('button-toggle-visible');
				}
				if (scheduled_visibility == 'visible') {
					$('#toggleScheduled').removeClass('button-toggle-hidden').addClass('button-toggle-visible');
				}
				else {
					$('#toggleScheduled').addClass('button-toggle-hidden').removeClass('button-toggle-visible');
				}
			}
			
			
			$('button#toggleReconciled').on('click', toggleReconciled);
			$('button#toggleScheduled').on('click', toggleScheduled);	  
		}
      },
      
      this.observe = function(changedNodes) {
		  if ( changedNodes.has('ynab-grid-body') ) {
		    ynabToolKit.toggleTransactionFilters.invoke();
		  }
	  };
			
    };
    
	ynabToolKit.toggleTransactionFilters.invoke();
  } else {
    setTimeout(poll, 250);
  }
})();
<commit_msg>Continued work on feature<commit_after>(function poll() {
  // Waits until an external function gives us the all clear that we can run (at /shared/main.js)
  if ( typeof ynabToolKit !== "undefined"  && ynabToolKit.actOnChangeInit === true ) {

    ynabToolKit.toggleTransactionFilters = new function()  { // Keep feature functions contained within this

	  function toggleReconciled()
	  {
		
	  }
	  
	  function toggleScheduled()
	  {
	  
	  }
	  
	  


      this.invoke = function() 
      {	
		if (/accounts/.test(window.location.href)) 
		{
			/*
				Need to improve by checking Ember for filter settings, 
				rather than checking for classes of transactions rows that change
				
				ynab.utilities
				
				this.budgetView = ynab.YNABSharedLib
				  .getBudgetViewModel_AllBudgetMonthsViewModel()._result; // jscs:ignore requireCamelCaseOrUpperCaseIdentifiers
				  
				var grid = Ember.View.views[Ember.keys(Ember.View.views)[0]].container.lookup('view:ynab-grid/index');
				var rowHeight = 30 + (10 * ynabToolKit.options.accountRowsHeight);
				grid.set('recordHeight', rowHeight);  
				
				
				
				
				
				Controller: App.AccountsController
				Name: modals.account.filters
				Template: modals.account.filters
				
				renderedName: modals.account.filters
				stored in: App/Modals/account/filtersView "reconciled" and "scheduled" booleans
				
				access using get, set using set
				
				controller.set('reconciled', !this.get('reconciled'));
			*/
			
			var grid = Ember.View.views[Ember.keys(Ember.View.views)[0]].container.lookup('model:accounts');
			var setting_reconciled = grid.get('reconciled');  
			
			console.log(grid);
//			console.log(setting_reconciled);
		
			// check transaction visibility
			if ( $('.is-reconciled-row').length ) { var reconciled_visibility = 'visible'; } else { var reconciled_visibility = 'hidden'; }
			if ( $('.is-scheduled').length ) { var scheduled_visibility = 'visible'; } else { var scheduled_visibility = 'hidden'; }	
			
			// create button markup
			var button_reconciled_markup = '<button id="toggleReconciled" class="ember-view button button-toggle-'+reconciled_visibility.toLowerCase()+'">Reconciled</button>';
			var button_scheduled_markup = '<button id="toggleScheduled" class="ember-view button button-toggle-'+scheduled_visibility.toLowerCase()+'">Scheduled</button>';
			
			// insert or edit buttons
			if (! $("#toggleReconciled").length ) 
			{
				$(".accounts-toolbar .accounts-toolbar-right").append(button_scheduled_markup);		
				$(".accounts-toolbar .accounts-toolbar-right").append(button_reconciled_markup);
				$(".accounts-toolbar .accounts-toolbar-right").append('<span class="label">Show:</span>');	
			}
			else 
			{
				if (reconciled_visibility == 'visible') {
					$('#toggleReconciled').removeClass('button-toggle-hidden').addClass('button-toggle-visible');
				}
				else {
					$('#toggleReconciled').addClass('button-toggle-hidden').removeClass('button-toggle-visible');
				}
				if (scheduled_visibility == 'visible') {
					$('#toggleScheduled').removeClass('button-toggle-hidden').addClass('button-toggle-visible');
				}
				else {
					$('#toggleScheduled').addClass('button-toggle-hidden').removeClass('button-toggle-visible');
				}
			}
			
			
			$('button#toggleReconciled').on('click', toggleReconciled);
			$('button#toggleScheduled').on('click', toggleScheduled);	  
		}
      },
      
      this.observe = function(changedNodes) {
		  if ( changedNodes.has('ynab-grid-body') ) {
		    ynabToolKit.toggleTransactionFilters.invoke();
		  }
	  };
			
    };
    
	ynabToolKit.toggleTransactionFilters.invoke();
  } else {
    setTimeout(poll, 250);
  }
})();

{'fraction_non_alphanumeric': 0.14691494397980118, 'fraction_numerical': 0.0018936405239072117, 'mean_word_length': 3.5110320284697507, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6269633', 'n_tokens_mistral': 2260, 'n_tokens_neox': 1889, 'n_words': 324}