<commit_before>Modules.VERSION = '1.0.4';

this.counter = {
	redoing: false,
	current: 0,
	
	onPDFMatches: function() {
		this.fill();
	},
	
	onCleanUpHighlights: function() {
		this.clear();
	},
	
	onWillHighlight: function() {
		this.clear();
	},
	
	onHighlightFinished: function() {
		this.fill();
	},
	
	onFindResult: function() {
		if(document instanceof Ci.nsIDOMXMLDocument) {
			this.fill();
		}
	},
	
	onFindAgain: function() {
		this.fill();
	},
	
	clear: function() {
		this.current = 0;
	},
	
	result: function(v, held) {
		message('Counter:Result', {
			searchString: Finder.searchString,
			result: v || '',
			heldStatus: held || false
		});
	},
	
	fill: function() {
		// Special routine for PDF.JS
		if(isPDFJS) {
			this.redoing = false;
			
			// I hope adding this doesn't break anything else.
			if(document.readyState != 'complete' && document.readyState != 'interactive') {
				this.result();
				return;
			}
			
			let selected = 0;
			if(PDFJS.findController.selected.pageIdx > -1 && PDFJS.findController.selected.matchIdx > -1) {
				let total = 0;
				for(let pIdx in PDFJS.findController.pageMatches) {
					if(PDFJS.findController.selected.pageIdx == pIdx) {<commit_msg>bugfix matches counter not appearing in pdf files<commit_after>Modules.VERSION = '1.0.5';

this.counter = {
	redoing: false,
	current: 0,
	
	onPDFMatches: function() {
		this.fill();
	},
	
	onCleanUpHighlights: function() {
		this.clear();
	},
	
	onWillHighlight: function() {
		this.clear();
	},
	
	onHighlightFinished: function() {
		this.fill();
	},
	
	onFindResult: function() {
		if(document instanceof Ci.nsIDOMXMLDocument) {
			this.fill();
		}
	},
	
	onFindAgain: function() {
		this.fill();
	},
	
	clear: function() {
		this.current = 0;
	},
	
	result: function(v, held) {
		message('Counter:Result', {
			searchString: (isPDFJS) ? findQuery : Finder.searchString,
			result: v || '',
			heldStatus: held || false
		});
	},
	
	fill: function() {
		// Special routine for PDF.JS
		if(isPDFJS) {
			this.redoing = false;
			
			// I hope adding this doesn't break anything else.
			if(document.readyState != 'complete' && document.readyState != 'interactive') {
				this.result();
				return;
			}
			
			let selected = 0;
			if(PDFJS.findController.selected.pageIdx > -1 && PDFJS.findController.selected.matchIdx > -1) {
				let total = 0;
				for(let pIdx in PDFJS.findController.pageMatches) {
					if(PDFJS.findController.selected.pageIdx == pIdx) {
{'fraction_non_alphanumeric': 0.15528455284552845, 'fraction_numerical': 0.007317073170731708, 'mean_word_length': 3.2431034482758623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '957569', 'n_tokens_mistral': 1000, 'n_tokens_neox': 841, 'n_words': 173}