Etdiyiniz dəyişikliklərin yayımlanandan sonra effekt verməsi üçün brauzerinizin keşini təmizləməyə ehtiyacınız ola bilər. Bunun üçün Chrome, Firefox, Edge, yaxud Safari istifadəçisisinizsə, klaviaturanızın Shift düyməsini sıxaraq brauzerin ⟳ səhifə yeniləmək düyməsini klik edə bilərsiniz.
// Blokları rahat idarə etmək üçün skript(function(){if(mw.config.get('wgUserName')===null)return;// giriş yoxdursa çıx// Yalnız inzibatçılar görsünif(!mw.config.get('wgUserGroups').includes('sysop'))return;varcurrentUser=mw.config.get('wgUserName');varpageName=mw.config.get('wgPageName');// səhifə adıvardecodedPageName=decodeURIComponent(pageName);// URL-dən çıxarılmış ad// Öz istifadəçi səhifən, müzakirən və töhfələr səhifən göstərməif(decodedPageName==='İstifadəçi:'+currentUser||decodedPageName==='İstifadəçi_müzakirəsi:'+currentUser||decodedPageName==='Xüsusi:Töhfələr/'+currentUser){return;}// Yalnız aşağıdakı səhifələrdə işləsinif(!decodedPageName.startsWith('İstifadəçi:')&&!decodedPageName.startsWith('İstifadəçi_müzakirəsi:')&&!decodedPageName.startsWith('Xüsusi:Töhfələr/')){return;}// İstifadəçi adını ayırvarusername;if(decodedPageName.startsWith('Xüsusi:Töhfələr/')){username=decodedPageName.split('/')[1];}else{username=decodedPageName.split(':')[1];}varapi=newmw.Api();// Blok statusunu yoxlamaq üçün API çağırışıapi.get({action:'query',list:'blocks',bkusers:username,format:'json'}).done(function(data){varisBlocked=false;if(data.query.blocks&&data.query.blocks.length>0){isBlocked=true;}addButtons(isBlocked);});// Blokla və ya Bloku dəyiş / Ləğv et düymələrini əlavə edən funksiyafunctionaddButtons(isBlocked){varuserHeader=document.querySelector('h1#firstHeading, h1.page-header, #content h1');if(!userHeader)return;varcontainer=document.createElement('div');container.style.marginTop='8px';if(!isBlocked){varblockBtn=document.createElement('button');blockBtn.textContent='Blokla';blockBtn.style.backgroundColor='#d9534f';blockBtn.style.color='white';blockBtn.style.border='none';blockBtn.style.padding='5px 12px';blockBtn.style.fontWeight='bold';blockBtn.style.cursor='pointer';blockBtn.style.borderRadius='3px';blockBtn.onclick=function(){window.location.href=mw.util.getUrl('Special:BlockUser/'+username);};container.appendChild(blockBtn);}else{varchangeBtn=document.createElement('button');changeBtn.textContent='Bloku dəyiş';changeBtn.style.backgroundColor='#f0ad4e';changeBtn.style.color='white';changeBtn.style.border='none';changeBtn.style.padding='5px 12px';changeBtn.style.fontWeight='bold';changeBtn.style.cursor='pointer';changeBtn.style.borderRadius='3px';changeBtn.style.marginRight='10px';changeBtn.onclick=function(){window.location.href=mw.util.getUrl('Special:BlockUser/'+username);};varrevokeBtn=document.createElement('button');revokeBtn.textContent='Bloku ləğv et';revokeBtn.style.backgroundColor='#0275d8';revokeBtn.style.color='white';revokeBtn.style.border='none';revokeBtn.style.padding='5px 12px';revokeBtn.style.fontWeight='bold';revokeBtn.style.cursor='pointer';revokeBtn.style.borderRadius='3px';revokeBtn.onclick=function(){window.location.href=mw.util.getUrl('Special:Unblock/'+username);};container.appendChild(changeBtn);container.appendChild(revokeBtn);}userHeader.parentNode.insertBefore(container,userHeader.nextSibling);}})();