<commit_before><div class="panel panel-default toner-finder">
	
	<div class="panel-body">
		
		<h4 class="text-center"><strong>TONER & INK FINDER</strong></4>
		<h4 class="text-center">FIND TONER & PRINTER SUPPLIES FAST & EASY</h4>
		<br/>
		<select id="finder-make" class="form-control">
			<option>1 | Select Your Printer Brand</option>
			<% Spree::Taxon.find_by(:name => "Makes").children.each do |make| %>
				<option value="<%= make.id %>"><%= make.name %></option>
			<% end %>
		</select>

		<script>
			$("select#finder-make").change(function(event){
				var make = $("select#finder-make").val();

				var request = $.ajax({
					url : '/api/taxonomies/<%= Spree::Taxon.find_by(:name => "Makes").taxonomy_id %>/taxons/'+ make,
					data: {token: '<%= spree_current_user.spree_api_key %>'},
					dataType : "json"
				});

				request.success(function(data) {
					success_action(data)
				});

				request.error(function(httpObj, textStatus) {       
					if(httpObj.status == 200)
					success_action(data)
					else
					alert("Failed")
				});

				function success_action(data_object) {
					console.log(data_object.taxons)
					var text = "<option>2 | Select Your Printer Family</option>"
					for (var i=0; i < data_object.taxons.length; i++) {
						text += "<option value=" + data_object.taxons[i].id + ">" + data_object.taxons[i].name + "</option>"
					};
					$("select#finder-family").empty().append(text);
					$("select#finder-family").removeAttr("disabled");
				}

			});
		</script>
		<br/>

		<select id="finder-family" class="form-control" disabled>
			<option>2 | Select Your Printer Family</option>
		</select>

		<script>
			$("select#finder-family").change(function(event){
				var make = $("select#finder-family").val();

				var request = $.ajax({
					url : '/api/taxonomies/<%= Spree::Taxon.find_by(:name => "Makes").taxonomy_id %>/taxons/'+ make,
					data: {token: '<%= spree_current_user.spree_api_key %>'},
					dataType : "json"
				});

				request.success(function(data) {
					success_action(data)
				});

				request.error(function(httpObj, textStatus) {       
					if(httpObj.status == 200)
					success_action(data)
					else
					alert("Failed")
				});

				function success_action(data_object) {
					console.log(data_object.taxons)
					var text = "<option>3 | Select Your Printer Model</option>"
					for (var i=0; i < data_object.taxons.length; i++) {
						text += "<option value=" + data_object.taxons[i].id + ">" + data_object.taxons[i].name + "</option>"
					};
					$("select#finder-model").empty().append(text);
					$("select#finder-model").removeAttr("disabled");
				}

			});
		</script>

		<br/>

		<select id="finder-model" class="form-control" disabled>
			<option>3 | Select Your Printer Model</option>
		</select>

		<script>
			$("select#finder-model").change(function(event){
				var make = $("select#finder-model").val();

				var request = $.ajax({
					url : '/api/taxonomies/<%= Spree::Taxon.find_by(:name => "Makes").taxonomy_id %>/taxons/'+ make,
					data: {token: '<%= spree_current_user.spree_api_key %>'},
					dataType : "json"
				});

				request.success(function(data) {
					success_action(data)
				});

				request.error(function(httpObj, textStatus) {       
					if(httpObj.status == 200)
					success_action(data)<commit_msg>remove token from ajax requests<commit_after><div class="panel panel-default toner-finder">
	
	<div class="panel-body">
		
		<h4 class="text-center"><strong>TONER & INK FINDER</strong></4>
		<h4 class="text-center">FIND TONER & PRINTER SUPPLIES FAST & EASY</h4>
		<br/>
		<select id="finder-make" class="form-control">
			<option>1 | Select Your Printer Brand</option>
			<% Spree::Taxon.find_by(:name => "Makes").children.each do |make| %>
				<option value="<%= make.id %>"><%= make.name %></option>
			<% end %>
		</select>

		<script>
			$("select#finder-make").change(function(event){
				var make = $("select#finder-make").val();

				var request = $.ajax({
					url : '/api/taxonomies/<%= Spree::Taxon.find_by(:name => "Makes").taxonomy_id %>/taxons/'+ make,
					// data: {token: '<%# spree_current_user.spree_api_key %>'},
					dataType : "json"
				});

				request.success(function(data) {
					success_action(data)
				});

				request.error(function(httpObj, textStatus) {       
					if(httpObj.status == 200)
					success_action(data)
					else
					alert("Failed")
				});

				function success_action(data_object) {
					console.log(data_object.taxons)
					var text = "<option>2 | Select Your Printer Family</option>"
					for (var i=0; i < data_object.taxons.length; i++) {
						text += "<option value=" + data_object.taxons[i].id + ">" + data_object.taxons[i].name + "</option>"
					};
					$("select#finder-family").empty().append(text);
					$("select#finder-family").removeAttr("disabled");
				}

			});
		</script>
		<br/>

		<select id="finder-family" class="form-control" disabled>
			<option>2 | Select Your Printer Family</option>
		</select>

		<script>
			$("select#finder-family").change(function(event){
				var make = $("select#finder-family").val();

				var request = $.ajax({
					url : '/api/taxonomies/<%= Spree::Taxon.find_by(:name => "Makes").taxonomy_id %>/taxons/'+ make,
					// data: {token: '<%# spree_current_user.spree_api_key %>'},
					dataType : "json"
				});

				request.success(function(data) {
					success_action(data)
				});

				request.error(function(httpObj, textStatus) {       
					if(httpObj.status == 200)
					success_action(data)
					else
					alert("Failed")
				});

				function success_action(data_object) {
					console.log(data_object.taxons)
					var text = "<option>3 | Select Your Printer Model</option>"
					for (var i=0; i < data_object.taxons.length; i++) {
						text += "<option value=" + data_object.taxons[i].id + ">" + data_object.taxons[i].name + "</option>"
					};
					$("select#finder-model").empty().append(text);
					$("select#finder-model").removeAttr("disabled");
				}

			});
		</script>

		<br/>

		<select id="finder-model" class="form-control" disabled>
			<option>3 | Select Your Printer Model</option>
		</select>

		<script>
			$("select#finder-model").change(function(event){
				var make = $("select#finder-model").val();

				var request = $.ajax({
					url : '/api/taxonomies/<%= Spree::Taxon.find_by(:name => "Makes").taxonomy_id %>/taxons/'+ make,
					// data: {token: '<%# spree_current_user.spree_api_key %>'},
					dataType : "json"
				});

				request.success(function(data) {
					success_action(data)
				});

				request.error(function(httpObj, textStatus) {       
					if(httpObj.status == 200)
					success_action(data)
{'fraction_non_alphanumeric': 0.19270598829356145, 'fraction_numerical': 0.0060033018159988, 'mean_word_length': 3.304909560723514, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 107, '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': '2392632', 'n_tokens_mistral': 2861, 'n_tokens_neox': 2239, 'n_words': 385}