<commit_before>/*
---
description: Sets up all inputs with the css class .overtext to have an OverText instance for inline labeling. This is a global filter
provides: [Behavior.OverText]
requires: [/Behavior, More/OverText]
script: Behavior.OverText.js
...
*/

Behavior.addGlobalFilter('OverText', function(element, container){
	//create the overtext instance
	var ot = new OverText(element);

	//this method updates the text position with a slight delay
	var updater = function(){
		(function(){
			ot.reposition();
		}).delay(10);
	};

	//update the position whenever the behavior container is shown
	container.addEvent('show', updater);

	this.markForCleanup(element, function(){
		container.removeEvent('show', updater);
		ot.destroy();
	});

});<commit_msg>overtext filter applies classes to labels for styling<commit_after>/*
---
description: Sets up all inputs with the css class .overtext to have an OverText instance for inline labeling. This is a global filter
provides: [Behavior.OverText]
requires: [/Behavior, More/OverText]
script: Behavior.OverText.js
...
*/

Behavior.addGlobalFilter('OverText', function(element, container){
	//create the overtext instance
	var ot = new OverText(element);
	element.get('class').split(' ').each(function(cls) {
		ot.text.addClass('OverText-'+cls);
	});

	//this method updates the text position with a slight delay
	var updater = function(){
		(function(){
			ot.reposition();
		}).delay(10);
	};

	//update the position whenever the behavior container is shown
	container.addEvent('show', updater);

	this.markForCleanup(element, function(){
		container.removeEvent('show', updater);
		ot.destroy();
	});

});
{'fraction_non_alphanumeric': 0.13433734939759037, 'fraction_numerical': 0.0024096385542168677, 'mean_word_length': 4.707903780068729, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4134626', 'n_tokens_mistral': 503, 'n_tokens_neox': 474, 'n_words': 158}