<commit_before>// console.log("Loading Init...");


Spontaneous.Init = (function($, S) {
	with (Spontaneous) {

		//
		// Preview.add_listener('location', Location, 'update');
		// Editing.add_listener('location', Location, 'update');
		// Location.add_listener('location',TopBar, 'location_changed');
		// // Location.add_listener('map',     TopBar, 'map_changed');
		// TopBar.add_listener('location',  ContentArea, 'goto');
		// TopBar.add_listener('mode',      ContentArea, 'display');
		// Editing.add_listener('location', SideBar, 'location_changed');
		// Preview.add_listener('location', SideBar, 'location_changed');


		return function() {

			//// won't work unfortunately
			// $('img').live('error', function() {
			// 	console.log('error', this)
			// 	$(this).attr('src', '/media/01158/0039/fright_night.jpeg')
			// });

			Types.init();

			Location.add_listener('location', TopBar, 'location_changed');
			Location.add_listener('location', ContentArea, 'location_changed');

			TopBar.add_listener('mode',       ContentArea, 'display');
			TopBar.add_listener('mode',       Location, 'view_mode_changed');

			Editing.add_listener('page', Location, 'page_loaded');

			Dom.body().append(TopBar.panel());
			Dom.body().append(ContentArea.init());
			Dom.body().append(StatusBar.init());

			Location.init(function() {
				TopBar.init();
			});

			// $(document).click(function(event) {
			// 	Spontaneous.Popover.open(event, new Spontaneous.PopoverView())
			// })
			// Spontaneous.Spin = SideBar.spinner();
		};
	}
})(jQuery, Spontaneous);
<commit_msg>more compressable version<commit_after>// console.log("Loading Init...");


Spontaneous.Init = (function($, S) {

	//
	// Preview.add_listener('location', Location, 'update');
	// Editing.add_listener('location', Location, 'update');
	// Location.add_listener('location',TopBar, 'location_changed');
	// // Location.add_listener('map',     TopBar, 'map_changed');
	// TopBar.add_listener('location',  ContentArea, 'goto');
	// TopBar.add_listener('mode',      ContentArea, 'display');
	// Editing.add_listener('location', SideBar, 'location_changed');
	// Preview.add_listener('location', SideBar, 'location_changed');


	return function() {

		var location = S.Location, top_bar = S.TopBar, content_area = S.ContentArea, b = S.Dom.body();
		//// won't work unfortunately
		// $('img').live('error', function() {
		// 	console.log('error', this)
		// 	$(this).attr('src', '/media/01158/0039/fright_night.jpeg')
// });

		S.Types.init();

		location.add_listener('location', top_bar, 'location_changed');
		location.add_listener('location', content_area, 'location_changed');

		top_bar.add_listener('mode',       content_area, 'display');
		top_bar.add_listener('mode',       location, 'view_mode_changed');

		S.Editing.add_listener('page', location, 'page_loaded');

		b.append(top_bar.panel());
		b.append(content_area.init());
		b.append(S.StatusBar.init());

		location.init(function() {
			top_bar.init();
		});

		// $(document).click(function(event) {
		// 	Spontaneous.Popover.open(event, new Spontaneous.PopoverView())
		// })
		// Spontaneous.Spin = SideBar.spinner();
	};
})(jQuery, Spontaneous);

{'fraction_non_alphanumeric': 0.20025149324111916, 'fraction_numerical': 0.005658597925180761, 'mean_word_length': 4.190864600326265, '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': '3476552', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1024, 'n_words': 151}