<commit_before>(function (exports) {
	

	/*
	 * Wait Screen
	 * 
	 * Show a standard waiting screen
	 * 
	 */
	
	exports.WaitScreen = WaitScreen;
	
	function WaitScreen(id) {
		
		this.game = node.game;
		this.id = id || 'waiting';
		this.name = 'WaitingScreen';
		this.version = '0.2.1';
		
		
		this.text = 'Waiting for other players...';
		this.waitingDiv = null;
		
	}
	
	WaitScreen.prototype.append = function (root, id) {};
	
	WaitScreen.prototype.listeners = function () {
		var that = this;
		node.on('WAIT', function(text) {
			that.waitingDiv = node.window.addDiv(document.body, that.id);
			if (that.waitingDiv.style.display === "none"){
				that.waitingDiv.style.display = "";
			}
		
			that.waitingDiv.appendChild(document.createTextNode(that.text || text));
			that.game.pause();
		});
		
		// It is supposed to fade away when a new state starts
		node.on('STATECHANGE', function(text) {
			if (that.waitingDiv) {
				
				if (that.waitingDiv.style.display == ""){
					that.waitingDiv.style.display = "none";
				}
			// TODO: Document.js add method to remove element
			}
		});
		
	}; 
})(node.window.widgets);<commit_msg>Fixed waiting screen. Introduced auto_wait<commit_after>(function (exports) {
	

	/*
	 * Wait Screen
	 * 
	 * Show a standard waiting screen
	 * 
	 */
	
	exports.WaitScreen = WaitScreen;
	
	function WaitScreen (options) {
		
		this.game = node.game;
		this.id = options.id || 'waiting';
		this.name = 'WaitingScreen';
		this.version = '0.3';
		
		
		this.text = 'Waiting for other players to be done...';
		this.waitingDiv = null;
		
	}
	
	WaitScreen.prototype.append = function (root, id) {};
	
	WaitScreen.prototype.listeners = function () {
		var that = this;
		node.on('WAITING...', function (text) {
			console.log('WOWO');
			if (!that.waitingDiv) {
				that.waitingDiv = node.window.addDiv(document.body, that.id);
			}
			
			if (that.waitingDiv.style.display === 'none'){
				that.waitingDiv.style.display = '';
			}			
		
			that.waitingDiv.innerHTML = text || that.text;
			that.game.pause();
		});
		
		// It is supposed to fade away when a new state starts
		node.on('STATECHANGE', function(text) {
			if (that.waitingDiv) {
				
				if (that.waitingDiv.style.display == ''){
					that.waitingDiv.style.display = 'none';
				}
			// TODO: Document.js add method to remove element
			}
		});
		
	}; 
})(node.window.widgets);
{'fraction_non_alphanumeric': 0.15494736842105264, 'fraction_numerical': 0.002105263157894737, 'mean_word_length': 2.813804173354735, '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': '5164393', 'n_tokens_mistral': 956, 'n_tokens_neox': 782, 'n_words': 166}