Difference between revisions of "User:King of Herdaz/Toolbar customization"

no edit summary
The editing toolbar is a versatile and very useful tool that can be used to make working on the wiki much easier. While the basic version (which is an option in your [[Special:Preferences#mw-prefsection-editing|preferences]]) has some use, the main benefit comes when you customize your toolbar. In this guide there isare a list oftested premade elements that you can use as well as guides to creating and modifying your own buttons, booklets, and dropdowns.
 
While modifying your toolbar can seem scary, once you get the hang of it, it really isn't a big deal. Also, anything you do can be easily undone so feel free to play around and experiment with different things. You do not need any knowledge of how the system works to use the premade elements on this page, simply copy-paste them into your toolbar and you are good to go.
 
== Basic ==
To create your own button paste the code at the end of this section into your <code>/common.js</code> page between the two [[#Basic]] sections and change the following things:
 
* Replace <code>AAAA</code> with the name of the section you would like to put the button. Unless you are adding new [[#Sections|sections]] to the toolbar this should be either <code>main</code> or <code>advanced</code>.
* If you want, you can put a description on the first line after the <code>//</code> as a comment. Whatever you write after a <code>//</code> will not affect your code.
* Replace <code>BBBB</code> with the name of the part of that section where you would like your button to go. If it will be in the <code>main</code> section this should be <code>format</code> (though <code>insert</code> can also work). If it will be in the <code>advanced</code> section then this can be either <code>heading</code>, <code>format</code> (this will work best and is recommended), <code>size</code>, or <code>insert</code>.
* Replace <code>AAAA</code> with the name of the section you would like to put the button.
* Replace <code>BBBB</code> with the name of the part of that section where you would like your button to go.
* Replace <code>CCCC</code> with what you want to name the button internally. The text that you put here does not actually affect anything and only matters for stylistic purposes.
* Replace <code>DDDD</code> with what you want to name the button. Unlike the previous item, this actually makes a difference. The text you put here will be shown when you hover your cursor over this button's icon on your toolbar.
* For the same reason you must also do this when writing category tags. For example, instead of writing <code><nowiki>[[Category: Stormlight]]</nowiki></code> you should write <code><nowiki>[' + '[Category: Stormlight]]</nowiki></code>.
* When writing code for substitutions this is even more important, since if you do not do it then the substitution will be performed when you save your <code>common.js</code> page. For example, instead of writing <code><nowiki>{{SUBST:PAGENAME}}</nowiki></code> you should write <code><nowiki>{' + '{SUBST:PAGENAME}}</nowiki></code>.
* DoYou notcannot reuse internal names within your entire toolbar.
* IfTo youadd want, youa cancomment put a description on the first line after the <code>//</code> asat the beginning of a line followed by the text of the comment. Whatever you write after a <code>//</code> will not affect your code.
 
=== Actions ===
Autopatrolled, Editors
8,718

edits