<commit_before>define(["CodeMirror", "MySQLCodeMirror", "jQuery"], function (CodeMirror, myMode, $){ 
	
	var fiddleEditor = function (domID, changeHandler, viewRef, runHandler) {
		this.codeMirrorSupported = !( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) );
		
		if (this.codeMirrorSupported)
		{
			this.codeMirror = CodeMirror.fromTextArea(document.getElementById(domID), {
				mode: "mysql",
				matchBrackets: true,
				extraKeys: {Tab: "indentMore"},
				lineNumbers: true,
				onChange: function(){ changeHandler.call(viewRef) }
			  });
			$(this.codeMirror.getWrapperElement()).on("keypress", function (e) {
				if (e.keyCode == 13 && e.ctrlKey && runHandler)
				{
					e.preventDefault();
					runHandler();
				}
			})
		}
		else
		{
			this.textArea = document.getElementById(domID);
			$(this.textArea).on('change', function(){ changeHandler.call(viewRef) });
			$(this.textArea).on('keyup', function(){ changeHandler.call(viewRef) });
			$(this.textArea).attr('fullscreen',false);
		}
		
		return this;<commit_msg>Adding Ctrl-Enter for textarea-based fiddles, for good measure<commit_after>define(["CodeMirror", "MySQLCodeMirror", "jQuery"], function (CodeMirror, myMode, $){ 
	
	var fiddleEditor = function (domID, changeHandler, viewRef, runHandler) {
		this.codeMirrorSupported = !( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) );
		
		if (this.codeMirrorSupported)
		{
			this.codeMirror = CodeMirror.fromTextArea(document.getElementById(domID), {
				mode: "mysql",
				matchBrackets: true,
				extraKeys: {Tab: "indentMore"},
				lineNumbers: true,
				onChange: function(){ changeHandler.call(viewRef) }
			  });
			$(this.codeMirror.getWrapperElement()).on("keypress", function (e) {
				if (e.keyCode == 13 && e.ctrlKey && runHandler)
				{
					e.preventDefault();
					runHandler();
				}
			})
		}
		else
		{
			this.textArea = document.getElementById(domID);
			$(this.textArea).on('change', function(){ changeHandler.call(viewRef) });
			$(this.textArea).on('keyup', function(){ changeHandler.call(viewRef) });
			$(this.textArea).on('keypress', function(e){
				if (e.keyCode == 13 && e.ctrlKey && runHandler)
				{
					e.preventDefault();
					runHandler();
				}
			});
			
			$(this.textArea).attr('fullscreen',false);
		}
		
		return this;
{'fraction_non_alphanumeric': 0.16809974204643163, 'fraction_numerical': 0.0025795356835769563, 'mean_word_length': 4.1255506607929515, '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': '2395480', 'n_tokens_mistral': 929, 'n_tokens_neox': 744, 'n_words': 121}