<commit_before>$.extend(cur_frm.cscript, {
	layout: function(doc) {
		if(!doc.layout) doc.layout = 'Two column with header'
		hide_field(['head_section', 'side_section', 'javascript', 'css']);
		if(doc.layout=='Two column with header') {
			unhide_field(['head_section', 'side_section']);
		}
		if(doc.layout=='Two column') {
			unhide_field('side_section');
		}
		if(doc.insert_code) {
			if(!doc.javascript) {
				doc.javascript = 'wn.pages["'+doc.name+'"].onload = function(wrapper) { }';				
			}
			unhide_field('javascript');
		}
		if(doc.insert_style) {
			if(!doc.css) {
				doc.css = '#page-'+doc.name+' { }';	
			}
			unhide_field('css');
		}
	},
	refresh: function(doc) {
		cur_frm.cscript.layout(doc);
	},
	insert_style: function(doc) {
		cur_frm.cscript.layout(doc);		
	},
	insert_code: function(doc) {<commit_msg>tinymce fixes<commit_after>$.extend(cur_frm.cscript, {
	layout: function(doc) {
		if(!doc.__islocal) {
			if(doc.insert_code) {
				if(!doc.javascript) {
					cur_frm.set_value("javascript", 
						'wn.pages["'+doc.name+'"].onload = function(wrapper) { }');
				}
			}
			if(doc.insert_style) {
				if(!doc.css) {
					cur_frm.set_value("css", '#page-'+doc.name+' { }');	
				}
			}
		}
	},
	refresh: function(doc) {
		cur_frm.cscript.layout(doc);
	},
	insert_style: function(doc) {
		cur_frm.cscript.layout(doc);		
	},
	insert_code: function(doc) {
{'fraction_non_alphanumeric': 0.20130813953488372, 'fraction_numerical': 0.0, 'mean_word_length': 3.831578947368421, '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': '5091584', 'n_tokens_mistral': 621, 'n_tokens_neox': 544, 'n_words': 63}