<commit_before>// chceks if application ("room") has loaded
function checkRoomLoaded(){

	var loadingMessage = "Loading...";

	// Removes the dancing avatar loading image
	if( $('#room-loader') && $('#room-loader').html() !== loadingMessage ){
		$('#room-loader').html( loadingMessage );
	}

	// Check if loaded
	if( $('#room').length > 0 &&
		$('#plug_pro_chrome_extension_id')
	){
		clearInterval( this.loadedCheckInterval );
		this.emit( "load" );
	}
}


// Room constructor
function Room(){
	this.listeners = {};
}

// Initializes checking if application ("room") has loaded
Room.prototype.init = function(){

	// A messy way to check if the app has completed loading
	this.loadedCheckInterval = setInterval( checkRoomLoaded.bind(this), 200 );
	checkRoomLoaded.apply(this);

};
<commit_msg>Fix room load emit to wait  until fully loaded<commit_after>// chceks if application ("room") has loaded
function checkRoomLoaded(){

	var loadingMessage = "Loading...";

	// Removes the dancing avatar loading image
	if( $('#room-loader') && $('#room-loader').html() !== loadingMessage ){
		$('#room-loader').html( loadingMessage );
	}

	// Check if loaded
	if( $('#room').length > 0 &&
		$('#plug_pro_chrome_extension_id') &&
		$('#room-loader').length === 0
	){
		clearInterval( this.loadedCheckInterval );
		this.emit( "load" );
	}
}


// Room constructor
function Room(){
	this.listeners = {};
}

// Initializes checking if application ("room") has loaded
Room.prototype.init = function(){

	// A messy way to check if the app has completed loading
	this.loadedCheckInterval = setInterval( checkRoomLoaded.bind(this), 200 );
	checkRoomLoaded.apply(this);

};

{'fraction_non_alphanumeric': 0.1659625829812915, 'fraction_numerical': 0.005431502715751358, 'mean_word_length': 4.314102564102564, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1147685', 'n_tokens_mistral': 513, 'n_tokens_neox': 485, 'n_words': 140}