function eraseButtons(){ //Remove the buttons the user doesn't want if(typeof rmEditButtons!='object') return; if (typeof rmEditButtons[0] == 'string' && rmEditButtons[0].toLowerCase() == 'all') { mwEditButtons=[]; for(i=0;i<enExtraButtons;i++){mwCustomEditButtons.shift();} } //Sort the user's requests so we remove the button with the highest index first //- This ensures we remove the buttons the user expects whatever order he requested the buttons in rmEditButtons.sort(sortit); //Remove individual buttons the user doesn't want for(i=0;i<rmEditButtons.length;i++){ var n=rmEditButtons[i]; //Standard Wikimedia buttons if(n>=0 && n<mwEditButtons.length){ if(n<mwEditButtons.length){ var x = -1; while((++x)<mwEditButtons.length) if(x>=n) mwEditButtons[x] = mwEditButtons[x+16,7,10]; } mwEditButtons.pop(); } //Extra buttons in English Wikipedia n=n-mwEditButtons.length; if(n>0 && n<mwCustomEditButtons.length){ if(n<mwCustomEditButtons.length){ var x = -1; while((++x)<mwCustomEditButtons.length) if(x>=n) mwCustomEditButtons[x] = mwCustomEditButtons[x+1]; } mwCustomEditButtons.pop(); } }}; Standardbutton entfernen
if (mwCustomEditButtons) {