19,809
edits
No edit summary |
No edit summary |
||
| Line 132: | Line 132: | ||
function eraseButtons(){ | function eraseButtons(){ | ||
var rmEditButtons={'all'} | |||
//Remove the buttons the user doesn't want | //Remove the buttons the user doesn't want | ||
if(typeof rmEditButtons!='object') return; | if(typeof rmEditButtons!='object') return; | ||
if (typeof rmEditButtons[0] == 'string' && rmEditButtons[0].toLowerCase() == 'all') | |||
{ | |||
mwEditButtons=[]; | mwEditButtons=[]; | ||
for(i=0;i<enExtraButtons;i++){mwCustomEditButtons.shift();} | for(i=0;i<enExtraButtons;i++){mwCustomEditButtons.shift();} | ||
} | |||
//Sort the user's requests so we remove the button with the highest index first | //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 | //- This ensures we remove the buttons the user expects whatever order he requested the buttons in | ||