<commit_before>moduleAid.VERSION = '1.7.9';

this.__defineGetter__('FITresizer', function() { return gFindBar._FITresizer; });
this.__defineGetter__('FITbox', function() { return $(objName+'-findInTabs-box'); });
this.__defineGetter__('FITtabs', function() { return $(objName+'-findInTabs-tabs'); });
this.__defineGetter__('FITtabsList', function() { return FITtabs.firstChild; });
this.__defineGetter__('FITtabsGroups', function() { return FITtabsList.nextSibling; });
this.__defineGetter__('FITtabsHeader', function() { return FITtabsList.firstChild; });
this.__defineGetter__('FIThits', function() { return $(objName+'-findInTabs-hits'); });
this.__defineGetter__('FITupdate', function() { return gFindBar._FITupdate; });
this.__defineGetter__('FITfilter', function() { return $(objName+'-findInTabs-filter'); });

this.HITS_LENGTH = 150; // Length of preview text from preview items in find in tabs box

this.processingFITTab = false; // true means we are processing a tab currently, to ensure we only do one at a time to boost performance
this.lastWindow = null;
this.FITWorking = false;

// All the different filters we can use for the FIT lists
this.FITfilterList = [
	stringsAid.get('findInTabs', 'groupsEverything'),
	stringsAid.get('findInTabs', 'groupsSource'),
	stringsAid.get('findInTabs', 'groupsAllTabs'),
	stringsAid.get('findInTabs', 'groupsPinnedTabs')
];

this.toggleFITBox = function() {
	var toggle = FITbox.hidden;
	
	FITbox.hidden = !toggle;
	toggleAttribute(FITbroadcaster, 'checked', toggle);
	updateFITElements();
	
	/* Open the findbar if it isn't already when opening FIT */
	if(toggle && (gFindBar.hidden || gFindBar._findMode != gFindBar.FIND_NORMAL)) {
		gFindBar.onFindCommand();
		if(gFindBar._findField.value) {
			gFindBar._setHighlightTimeout();
		}
	}
	else if(!toggle && linkedPanel._findWord) {
		gFindBar.value = linkedPanel._findWord;
	}
	
	initFindBar('toggleFIT',
		function(bar) { bar._keepCurrentValue = toggle; },
		function(bar) { delete bar._keepCurrentValue; },
		true
	);
	
	if(perTabFB) {
		timerAid.init('toggleFIT', function() {
			if(toggle) {
				moduleAid.load('globalFB');
			} else {
				togglePerTab();
			}
		}, 0);
	}
	
	shouldFindAll();
};<commit_msg>bugfix FIT closing when changing tabs<commit_after>moduleAid.VERSION = '1.7.10';

this.__defineGetter__('FITresizer', function() { return gFindBar._FITresizer; });
this.__defineGetter__('FITbox', function() { return $(objName+'-findInTabs-box'); });
this.__defineGetter__('FITtabs', function() { return $(objName+'-findInTabs-tabs'); });
this.__defineGetter__('FITtabsList', function() { return FITtabs.firstChild; });
this.__defineGetter__('FITtabsGroups', function() { return FITtabsList.nextSibling; });
this.__defineGetter__('FITtabsHeader', function() { return FITtabsList.firstChild; });
this.__defineGetter__('FIThits', function() { return $(objName+'-findInTabs-hits'); });
this.__defineGetter__('FITupdate', function() { return gFindBar._FITupdate; });
this.__defineGetter__('FITfilter', function() { return $(objName+'-findInTabs-filter'); });

this.HITS_LENGTH = 150; // Length of preview text from preview items in find in tabs box

this.processingFITTab = false; // true means we are processing a tab currently, to ensure we only do one at a time to boost performance
this.lastWindow = null;
this.FITWorking = false;

// All the different filters we can use for the FIT lists
this.FITfilterList = [
	stringsAid.get('findInTabs', 'groupsEverything'),
	stringsAid.get('findInTabs', 'groupsSource'),
	stringsAid.get('findInTabs', 'groupsAllTabs'),
	stringsAid.get('findInTabs', 'groupsPinnedTabs')
];

this.toggleFITBox = function() {
	var toggle = FITbox.hidden;
	
	FITbox.hidden = !toggle;
	toggleAttribute(FITbroadcaster, 'checked', toggle);
	updateFITElements();
	
	/* Open the findbar if it isn't already when opening FIT */
	if(toggle && (gFindBar.hidden || gFindBar._findMode != gFindBar.FIND_NORMAL)) {
		gFindBar.onFindCommand();
		if(gFindBar._findField.value) {
			gFindBar._setHighlightTimeout();
		}
	}
	else if(!toggle && linkedPanel._findWord) {
		gFindBar.value = linkedPanel._findWord;
	}
	
	initFindBar('toggleFIT',
		function(bar) { bar._keepCurrentValue = toggle; },
		function(bar) { delete bar._keepCurrentValue; },
		true
	);
	
	if(perTabFB) {
		timerAid.init('toggleFIT', function() {
			if(toggle) {
				moduleAid.load('globalFB');
			} else {
				togglePerTab();
			}
		}, 0);
	} else {
		timerAid.init('toggleFIT', function() {
			if(toggle) {
				moduleAid.unload('perTab');
			} else {
				togglePerTab();
			}
		}, 0);
	}
	
	shouldFindAll();
};
{'fraction_non_alphanumeric': 0.15379595388296716, 'fraction_numerical': 0.003480530780944094, 'mean_word_length': 5.368421052631579, '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': '5144389', 'n_tokens_mistral': 1610, 'n_tokens_neox': 1526, 'n_words': 309}