/* На основе [[:pl:MediaWiki:Common-edit.js]] */$(function(){if(window.NoSummaryWarningDone)return;varbutton=document.getElementById('wpSave');if(button)button.onclick=FormValidation;});functionFormValidation(){varinput_el=document.getElementById('wpSummary');varsummary=input_el.value;// user has been warnedif(input_el.warningSet)returntrue;// empty or nothing but section commentif(summary==''||summary.substring(summary.indexOf('*/'))=='*/ '){// ignore redirects - there is autosummaryvarwpTextbox1=document.getElementById('wpTextbox1');if(wpTextbox1.value.match(/^#(?:REDIRECT|PRZEKIERUJ|TAM)/i))returntrue;// do not check titles of sections on non-talk pagesif(mw.config.get('wgNamespaceNumber')%2==0&&input_el.form.wpSection.value=='new')returntrue;// set warning, do not submit forminput_el.warningSet=true;input_el.className='warning';document.getElementById('wpSummaryLabel').className='warning';returnfalse;}returntrue;}