Ok, that's great to remove some of the default buttons. Neat little hack!
Thanks, matsch
Am Mon, 17 Aug 2009 00:35:36 +0200 schrieb Platonides Platonides@gmail.com:
Matthias Korn schrieb:
Try this instead:
function addButton(imageFile, speedTip, tagOpen, tagClose, sampleText, imageId) { if ((imageId=="mw-editbutton-image") || (imageId=="mw-editbutton-media")) return; mwEditButtons[mwEditButtons.length] = {"imageId": imageId, "imageFile": imageFile, "speedTip": speedTip, "tagOpen": tagOpen, "tagClose": tagClose, "sampleText": sampleText}; }
I don't quite understand what you suggest with this function. How would I use it to *remove* some of the default buttons? Adding custom buttons works fine...
Best, matsch
You add that function to eg. Mediawiki:monobook.js That function will be called *by mediawiki* to add the toolbar images.
And when it tries to add the image or media buttons:
if ((imageId=="mw-editbutton-image")||(imageId=="mw-editbutton-media"))
it returns without adding them to mwEditButtons.