{"size": 919, "ext": "js", "max_stars_repo_path": "modules/lsfilter/src/js/LSFilterTextarea.js", "max_stars_repo_name": "cmooreitrs/monitor-ninja", "max_stars_repo_stars_event_min_datetime": "2016-06-10T07:23:45.000Z", "max_stars_repo_stars_event_max_datetime": "2019-02-07T03:22:25.000Z", "max_issues_repo_path": "modules/lsfilter/src/js/LSFilterTextarea.js", "max_issues_repo_name": "cmooreitrs/monitor-ninja", "max_issues_repo_issues_event_min_datetime": "2019-03-25T13:42:01.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-22T10:14:51.000Z", "max_forks_repo_path": "modules/lsfilter/src/js/LSFilterTextarea.js", "max_forks_repo_name": "cmooreitrs/monitor-ninja", "max_forks_repo_forks_event_min_datetime": "2016-06-14T14:21:59.000Z", "max_forks_repo_forks_event_max_datetime": "2018-11-20T15:52:49.000Z"}
{"max_stars_count": 21, "max_issues_count": 57, "max_forks_count": 13, "avg_line_length": 22.4146341463, "max_line_length": 66, "alphanum_fraction": 0.6561479869}
var lsfilter_textarea = {
	// Configuration

	// External methods
	init: function(element, orderelement)
	{
		var self = this; // To be able to access it from within handlers

		this.element = element;
		this.orderelement = orderelement;
		this.element.bind('keyup paste cut', function(evt)
		{
			var query = $.trim((self.element.val()).toString());
			lsfilter_main.update_delayed(query, 'textarea');
		});
	},
	on: {
		'update_failed': function() {
			this.element.css("border", "2px solid #f40");
		},
		'update_ok': function(data) {
			if (!this.element)
				return;
			this.element.css("border", "2px solid #5d2");
			if (data.source == 'textarea') return;
			this.element.val(data.query);
		}
	},
	load: function()
	{
		var query = this.element.val();
		var order = this.orderelement.val();

		lsfilter_main.update(query, 'textarea', order);
	},

	// Internal veriables
	element: false,
	orderelement: false,
};
