if(document.URL.indexOf('&do:')>0)$(function(){vari=document.URL.indexOf('&do:',36);varops=document.URL.substring(i+4).split('&')[0].split(':');varwpTextbox1=document.getElementById('wpTextbox1');varwpSummary=document.getElementById('wpSummary');vararg,obj,value;for(iinops){args=ops[i].split('=');value=(args.length>1)?decodeURIComponent(args[1]):'';switch(args[0].toLowerCase()){case'wikify':if(wpTextbox1&Wikify)Wikify();break;case'insert':if(wpTextbox1)wpTextbox1.value=value+wpTextbox1.value;break;case'append':if(wpTextbox1)wpTextbox1.value+=value;break;case'summary':if(wpSummary)wpSummary.value+=value;break;case'focussummary':if(wpSummary)wpSummary.focus();break;case'focustext':if(wpTextbox1)wpTextbox1.focus();break;case'find':if(selectInTextArea)selectInTextArea(value);break;case'minor':if(obj=document.getElementById('wpMinoredit'))obj.checked=(value=='1');break;case'watch':if(obj=document.getElementById('wpWatchthis'))obj.checked=(value=='1');break;case'preview':if(obj=document.getElementById('wpPreview'))obj.click();return;case'diff':if(obj=document.getElementById('wpDiff'))obj.click();return;case'save':if((obj=document.getElementById('wpSave'))&&window.enableAutoSave)obj.click();return;default:document.title+=' ?'+args[0];}}})functionselectInTextArea(text){//temporary herevartxtarea=document.getElementById('wpTextbox1');if(!txtarea)return;if(txtarea.setSelectionRange){//Mozilla/OperavarselPos=txtarea.value.toLowerCase().indexOf(text.toLowerCase());if(selPos<0)return;txtarea.focus();txtarea.setSelectionRange(selPos,selPos+text.length);//try to scroll texarea next to cursortxtarea.scrollTop=txtarea.scrollHeight*selPos/txtarea.value.length-50;//try to scroll the window to textarea better //if (window.pageYOffset + window.innerHeight < txtarea.offsetHeight + 200) window.scrollTo(0,txtarea.offsetHeight - 50); }elseif(txtarea.createTextRange){//IEvaroRange=txtarea.createTextRange();if(oRange.findText(text))oRange.select();}}