Wikipedia:User scripts/Guide: Difference between revisions

Content deleted Content added
update
Toolbar: update
Line 301:
Buttons above textarea are located inside <code><nowiki><div id='toolbar'></nowiki></code>.
 
Buttons are defined with <tt>mwEditButtons[]<tt> and <tt>mwCustomEditButtons[]</tt> arrays. Then the 2nd part of your script is called by <tt>addOnloadHook</tt>. Only after that the buttons are created by <tt>mwSetupToolbar()</tt> in wikibits[http://en.wikipedia.org//skins-1.5/common/edit.js edit.js].
 
So the easiest way to modify buttons is to work with these arrays: