User:Kaptain K. Rool/monobook.js

function $(a){return document.getElementById(a)}function unserc(val){tmp=[];tmp2=[];get=[];url=location.search;if(url){tmp=url.substr(1).split('&');for(i=0;i/g,' ');$('wpTextbox1').value=$('wpTextbox1').value.replace(/ ')} function editer{editlead=document.getElementById('firstHeading');if(editlead){editlead.innerHTML+=' [edit] '}} onload=function{ jmg=document.getElementsByTagName('img');for(k=0;k<jmg.length;k++){if(jmg[k].getAttribute('width')&&jmg[k].src.indexOf('/thumb')!=-1&&jmg[k].src.indexOf('.jpg')){if(jmg[k].src.lastIndexOf('.jpg')-jmg[k].src.length+4==0){meq=me.width;mew=me.height;me.src=me.src.replace('/thumb',);me.src=me.src.replace(/\/[0123456789]{1,4}px[^\/]*$/,);me.width=meq;me.height=mew}}} if(unserc('action')=='edit'||unserc('action')=='submit'){document.getElementsByClassName('editHelp')[0].parentNode.replaceChild(wf=document.createElement('input'), document.getElementsByClassName('editHelp')[0]);wf.type='button';wf.value='Image to file';wf.setAttribute('onclick','imgfi')} editab=document.getElementsById('ca-edit');editab=editab?editab.getElementsByTagName('a')[0].innerHTML:'';if(editab=='Edit'){if(wgIsArticle){rig=wgRestrictionEdit;gir=wgUserGroups;if(rig.length==0){editer}else{for(i=0;i<rig.length;i++){ for(z=0;z<gir.length;z++){if(rig[i]==gir[z]){editer;break}}}}}} }