<commit_before>define(["text!./StatusBar.html", "link!./StatusBar.css"], function(sHTML){
	return function(){
		this.setup = function(args){
			// args:
			//	domNode
			//	cssWidth
			//	cssHeight

			this.domNode = $(sHTML);
			this.statusLeft = this.domNode.find(".statusLeft");

			if(args.cssHeight){
				this.domNode.css("height", args.cssHeight);
				this.statusLeft.css("height", args.cssHeight);
			}
			if(args.cssWidth){
				this.domNode.css("width", args.cssWidth);
			}

			this.domNode.appendTo(args.domNode);
		};

		this.destroy = function(){
			this.domNode.remove();
		};

		this.update = function(percent){
			// arguments:
			//   percent: int [0, 100];
			this.statusLeft.css("width", percent + "%");
			this.statusLeft.css("backgroundColor", this.getColor(percent));
		};

		this.getColor = function(percent){
			return "RGB(43, 23, 45)";
		};
	};
});<commit_msg>colored status bar<commit_after>define(["text!./StatusBar.html", "link!./StatusBar.css"], function(sHTML){
	return function(){
		this.setup = function(args){
			// args:
			//	domNode
			//	cssWidth
			//	cssHeight

			this.domNode = $(sHTML);
			this.statusLeft = this.domNode.find(".statusLeft");

			if(args.cssHeight){
				this.domNode.css("height", args.cssHeight);
				this.statusLeft.css("height", args.cssHeight);
			}
			if(args.cssWidth){
				this.domNode.css("width", args.cssWidth);
			}

			this.domNode.appendTo(args.domNode);
		};

		this.destroy = function(){
			this.domNode.remove();
		};

		this.update = function(percent){
			// arguments:
			//   percent: int [0, 100];
			this.statusLeft.css("width", percent + "%");
			this.statusLeft.css("backgroundColor", this.getColor(percent));
		};

		this.getColor = function(percent){
			var color;
		    if (percent >= 50) {
		        color = 'RGB(139,238,132)';
		    }
		    else if (percent >= 20) {
		        color = 'RGB(215,174,111)';
		    }
		    else {
		        color = 'RGB(164,72,72)';
		    }
			return color;
		};
	};
});
{'fraction_non_alphanumeric': 0.18992443324937028, 'fraction_numerical': 0.021662468513853905, 'mean_word_length': 2.964071856287425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7427118', 'n_tokens_mistral': 849, 'n_tokens_neox': 683, 'n_words': 104}