if((mw.config.get('wgNamespaceNumber')%2||mw.config.get('wgNamespaceNumber')==4)&&document.URL.match(/&action=(edit|submit)/))$(function(){varwpSave=document.getElementById('wpSave');if(!wpSave)return;if(window.sigText)//change normal sig button as wellmwEditButtons[9].tagOpen=sigText;elsesigText='-- ~~\~~';//create buttonvarbtn=document.createElement('input');btn.type='button';btn.value='~';btn.onclick=function(){insertTags(sigText,'','')};btn.style.marginRight='4px';btn.title='Put your signature';if(window.sigAccessKey){btn.accessKey=sigAccessKey;btn.title+=' ['+tooltipAccessKeyPrefix+btn.accessKey+']';}wpSave.parentNode.insertBefore(btn,wpSave);//if namespace is 'Project' ('Wikipedia:…') then put Sig after Save except for Forum pages if((mw.config.get('wgNamespaceNumber')==4)&&(!mw.config.get('wgTitle').match('^(Форум[/ ]|Голосования/|Опросы/|Заявки на .*/|Запросы.|Кандидаты в .*/|К (удалению|объединению|переименованию|разделению|улучшению)/|Кандидаты в .*/|Проверка участников/|Вниманию участников)')||mw.config.get('wgTitle').match('/Архив'))){wpSave.parentNode.insertBefore(btn,wpSave.nextSibling);return;//avoid warning below}//warn if saving without signature wpSave.onclick=function(){if(document.editform.wpTextbox1.value.indexOf('~~\~')>=0)returntrue;elsereturnconfirm('Без подписи?');}})