<commit_before>"use strict";

(function() {
	var
		lastEnv = null,
		prefs   = {}
		;

	addEventListener('DOMContentLoaded', function() {
		removeEventListener('DOMContentLoaded', onLoad, false);

		prefs = sendSyncMessage('wappalyzer', { action: 'get prefs' })[0];

		onLoad();
	}, false);

	function onLoad() {
		if ( content.document.contentType != 'text/html' ) { return; }

		if ( prefs.analyzeOnLoad ) {
			content.document.documentElement.addEventListener('load', function() {
				var env = Object.keys(content.wrappedJSObject);

				if ( env.join() !== lastEnv ) {
					lastEnv = env.join();

					sendAsyncMessage('wappalyzer', {
						action: 'analyze',
						analyze: {
							env: Object.keys(content.wrappedJSObject)
							}
						});
				}

				removeEventListener('load', onLoad, true);
			}, true);
		}

		// HTML
		var html = content.document.documentElement.outerHTML;

		// Comments outside HTML
		//if ( content.document.lastChild.nodeType === 8 ) {
			//content.alert(content.document.lastChild.nodeValue);
		//}

		if ( html.length > 50000 ) {
			html = html.substring(0, 25000) + html.substring(html.length - 25000, html.length);
		}

		sendAsyncMessage('wappalyzer', {
			action:   'analyze',
			hostname: content.location.hostname,
<<<<<<< HEAD
			url:      content.location.href,
			analyze:  {
				html: html,
				env:  prefs.analyzeJavaScript ? Object.keys(content.wrappedJSObject) : []
				}
			});
=======
			html:     html,
			url:      content.location.href,
			env: 	  Object.keys(content.wrappedJSObject)
		});
>>>>>>> d21c37b881b38ba517900c5411a70a1a264b70ec
	}
})();<commit_msg>Fixed merge<commit_after>"use strict";

(function() {
	var
		lastEnv = null,
		prefs   = {}
		;

	addEventListener('DOMContentLoaded', function() {
		removeEventListener('DOMContentLoaded', onLoad, false);

		prefs = sendSyncMessage('wappalyzer', { action: 'get prefs' })[0];

		onLoad();
	}, false);

	function onLoad() {
		if ( content.document.contentType != 'text/html' ) { return; }

		if ( prefs.analyzeOnLoad ) {
			content.document.documentElement.addEventListener('load', function() {
				var env = Object.keys(content.wrappedJSObject);

				if ( env.join() !== lastEnv ) {
					lastEnv = env.join();

					sendAsyncMessage('wappalyzer', {
						action: 'analyze',
						analyze: {
							env: Object.keys(content.wrappedJSObject)
							}
						});
				}

				removeEventListener('load', onLoad, true);
			}, true);
		}

		// HTML
		var html = content.document.documentElement.outerHTML;

		// Comments outside HTML
		//if ( content.document.lastChild.nodeType === 8 ) {
			//content.alert(content.document.lastChild.nodeValue);
		//}

		if ( html.length > 50000 ) {
			html = html.substring(0, 25000) + html.substring(html.length - 25000, html.length);
		}

		sendAsyncMessage('wappalyzer', {
			action:   'analyze',
			hostname: content.location.hostname,
			url:      content.location.href,
			analyze:  {
				html: html,
				env:  prefs.analyzeJavaScript ? Object.keys(content.wrappedJSObject) : []
				}
			});
	}
})();
{'fraction_non_alphanumeric': 0.1597244998360118, 'fraction_numerical': 0.020662512299114463, 'mean_word_length': 3.1953232462173315, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, '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': '2122009', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1004, 'n_words': 171}