User:Equazcion/NewSectionSummaryBeta.js

if ( $('input[name="wpSection"][value="new"]').length > 0) { preSum = $('#wpSummary').attr('value'); $('#wpSummary').attr('value','').attr('name','wpSectionTitle'); var summary = '  ' + 'Edit summary (Briefly describe the changes you have made)' + '  '; $('.editOptions').prepend(summary); preSumReg = /\/\* (.*?) \*\/ (.*)/; var preSumRaw = preSumReg.exec(preSum); if (preSumRaw != null){ $('[name="wpSectionTitle"]').attr('value', preSumRaw[1]); $('[name="wpSummary"]').attr('value', preSumRaw[2]); $('.mw-content-ltr h2:first').html(preSumRaw[1]); }	$('#editform').submit(function{		var title = $('[name="wpSectionTitle"]').attr('value');		var summary = $('[name="wpSummary"]').attr('value');		$('[name="wpSummary"]').attr('value', '/* ' + title + ' */ ' + summary); 	}); }