MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

if (mwCustomEditButtons) {  ///// Add custom edit buttons

mwCustomEditButtons[mwCustomEditButtons.length] = { // image "imageFile": "images/d/de/Button_image.png", // URL, 23x22 pixels "speedTip": 'Insert an image (file).', // tooltip text "tagOpen": "[[File:", // text at block beginning	"tagClose": "]]",     // text at block end (if any) "sampleText": "Morningstarequitystylebox.GIF" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = {  // spacer, separate button groups "imageFile": "images/b/b1/Button_spacer.png", // white image, 12x22 pixels "speedTip": "", // no tooltip "tagOpen": "", // no text at block beginning "tagClose": "",     // no text at block end "sampleText": "" // no sample text };

mwCustomEditButtons[mwCustomEditButtons.length] = { // URL "imageFile": "images/f/ff/Button_URL.png", // URL, 23x22 pixels "speedTip": "External link. Provide link then text to display. Example: http://www.bogleheads.org The Bogleheads wiki", // tooltip text "tagOpen": "[", // text at block beginning "tagClose": "]",     // text at block end (if any) "sampleText": "http://www.bogleheads.org/wiki Bogleheads Wiki" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // internal wiki page link "imageFile": "images/2/27/Button_PageLink.png", // wiki page link, 23x22 pixels "speedTip": "Link to a wiki page. Example: Main Page. Or, add '|'+ text like: Main Page | Wiki to display Wiki.", // tooltip text "tagOpen": "", // text at block beginning	"tagClose": "",     // text at block end (if any) "sampleText": "Main Page" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // table "imageFile": "images/6/60/Button_insert_table.png", "speedTip": "Insert a table", "tagOpen": '\n{| class="wikitable"\n|-\n', "tagClose": "\n|}", "sampleText": "! header 1\n! header 2\n! header 3\n|-\n| row 1, cell 1\n| row 1, cell 2\n| row 1, cell 3\n|-\n| row 2, cell 1\n| row 2, cell 2\n| row 2, cell 3"   };

mwCustomEditButtons[mwCustomEditButtons.length] = { // block quote "imageFile": "images/f/fd/Button_blockquote.png", // block quote, 23x22 pixels "speedTip": "Create block of quoted text", // tooltip text "tagOpen": " ", // text at block beginning "tagClose": " ",     // text at block end (if any) "sampleText": "Block of text to quote" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = {  // spacer, separate button groups "imageFile": "images/b/b1/Button_spacer.png", // white image, 12x22 pixels "speedTip": "", // no tooltip "tagOpen": "", // no text at beginning "tagClose": "",     // no text at the end "sampleText": "" // no sample text };

mwCustomEditButtons[mwCustomEditButtons.length] = { // reference "imageFile": "images/d/d9/Button_Ref.png", // Reference, 23x22 pixels "speedTip": "Add a reference (footnote). Add after References section.", // tooltip text "tagOpen": " ",     // text at block end (if any) "sampleText": "Add a reference (footnote)" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // category "imageFile": "images/1/11/Button_category.png", // category, 23x22 pixels "speedTip": "Categorize the article. Place this at the bottom of the page. Use as many categories as needed.", // tooltip text "tagOpen": "[[Category:", // text at block beginning	"tagClose": "]]",     // text at block end (if any) "sampleText": "Development" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // footer "imageFile": "images/e/ea/Button_easy_cite.png", // cite (footer), 23x22 pixels "speedTip": "Creates citation for forum. Insert at page bottom.", // tooltip text "tagOpen": "\{\{Footer\}\}", // text at block beginning "tagClose": "",     // no text at block end "sampleText": "" // No sample text };

mwCustomEditButtons[mwCustomEditButtons.length] = {  // spacer, separate button groups "imageFile": "images/b/b1/Button_spacer.png", // white image, 12x22 pixels "speedTip": "", // no tooltip "tagOpen": "", // no text at beginning "tagClose": "",     // no text at the end "sampleText": "" // no sample text };

mwCustomEditButtons[mwCustomEditButtons.length] = { // Heading 1. As an author, Heading 1 is top level. Correctly uses wiki heading 2, leaves H1 alone for wiki page title. "imageFile": "images/f/f6/Button_head_H1.png", // Heading 1, 23x22 pixels "speedTip": "Top level heading. Starts at Level 2. Level 1 is reserved for the page title.", // tooltip text "tagOpen": "==", // text at block beginning "tagClose": "==",     // text at block end (if any) "sampleText": "Top-level heading" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // Header 2. See comments for Header 1. "imageFile": "images/0/04/Button_head_H2.png", // Heading 2, 23x22 pixels "speedTip": "Second level heading. Starts at Level 3 to be consistent with internal wiki use of headings.", // tooltip text "tagOpen": "===", // text at block beginning "tagClose": "===",     // text at block end (if any) "sampleText": "Second-level heading" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // Header 3. See comments for Header 1. "imageFile": "images/b/bb/Button_head_H3.png", // Heading 3, 23x22 pixels "speedTip": "Third level heading. Starts at Level 4 to be consistent with internal wiki use of headings.", // tooltip text "tagOpen": "====", // text at block beginning "tagClose": "====",     // text at block end (if any) "sampleText": "Third-level headline" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // Header 4. See comments for Header 1. "imageFile": "images/d/d9/Button_head_H4.png", // Heading 4, 23x22 pixels "speedTip": "Fourth level heading. Starts at Level 5 to be consistent with internal wiki use of headings.", // tooltip text "tagOpen": "=====", // text at block beginning "tagClose": "=====",     // text at block end (if any) "sampleText": "Fourth-level headline" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // Header 5. See comments for Header 1. "imageFile": "images/7/72/Button_head_H5.png", // Heading 5, 23x22 pixels "speedTip": "Fifth level heading. Starts at Level 6 to be consistent with internal wiki use of headings.", // tooltip text "tagOpen": "======", // text at block beginning "tagClose": "======",     // text at block end (if any) "sampleText": "Fifth-level headline" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = {  // spacer, separate button groups "imageFile": "images/b/b1/Button_spacer.png", // white image, 12x22 pixels "speedTip": "", // no tooltip "tagOpen": "", // no text at beginning "tagClose": "",     // no text at the end "sampleText": "" // no sample text };

mwCustomEditButtons[mwCustomEditButtons.length] = { // bold, a repeat of the existing toolbar but accessible from common.js	"imageFile": "images/e/e2/Button_bold.png", // Bold, 23x22 pixels "speedTip": "Bold text", // tooltip text "tagOpen": "'''", // text at block beginning "tagClose": "'''",     // text at block end (if any) "sampleText": "Bold text" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // italic, a repeat of the existing toolbar but accessible from common.js	"imageFile": "images/1/1d/Button_italic.png", // Italic, 23x22 pixels "speedTip": "Italic text", // tooltip text "tagOpen": "''", // text at block beginning "tagClose": "''",     // text at block end (if any) "sampleText": "Italic text" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // underline "imageFile": "images/f/fd/Button_underline.png", // Underline, 23x22 pixels "speedTip": "Underline text", // tooltip text "tagOpen": " ", // text at block beginning "tagClose": " ",     // text at block end (if any) "sampleText": "Underline text" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // strike-out "imageFile": "images/9/92/Button_strike_text.png", // Strike-out, 23x22 pixels "speedTip": "Strike-out text", // tooltip text "tagOpen": " ", // text at block beginning "tagClose": " ",     // text at block end (if any) "sampleText": "Strike-out text" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // subscript "imageFile": "images/a/aa/Button_sub_letter.png", // Subscript, 23x22 pixels "speedTip": "Subscript text", // tooltip text "tagOpen": " ", // text at block beginning "tagClose": " ",     // text at block end (if any) "sampleText": "Subscript text" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // superscript "imageFile": "images/6/6a/Button_sup_letter.png", // Superscript, 23x22 pixels "speedTip": "Superscript text", // tooltip text "tagOpen": " ", // text at block beginning "tagClose": " ",     // text at block end (if any) "sampleText": "Superscript text" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = {  // spacer, separate button groups "imageFile": "images/b/b1/Button_spacer.png", // white image, 12x22 pixels "speedTip": "", // no tooltip "tagOpen": "", // no text at beginning "tagClose": "",     // no text at the end "sampleText": "" // no sample text };

mwCustomEditButtons[mwCustomEditButtons.length] = { // align left "imageFile": "images/e/ea/Button_align_left.png", // align left, 23x22 pixels "speedTip": "Align text left", // tooltip text "tagOpen": ' ', // text at block beginning "tagClose": " ",     // text at block end (if any) "sampleText": "Align text left" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // align center "imageFile": "images/f/f7/Button_align_center.png", // align center, 23x22 pixels "speedTip": "Align text center", // tooltip text "tagOpen": ' ', // text at block beginning "tagClose": " ",     // text at block end (if any) "sampleText": "Align text center" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // align right "imageFile": "images/a/a5/Button_align_right.png", // align right, 23x22 pixels "speedTip": "Align paragraph right", // tooltip text "tagOpen": ' ', // text at block beginning "tagClose": " ",     // text at block end (if any) "sampleText": "Align text right" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = {  // spacer, separate button groups "imageFile": "images/b/b1/Button_spacer.png", // white image, 12x22 pixels "speedTip": "", // no tooltip "tagOpen": "", // no text at beginning "tagClose": "",     // no text at the end "sampleText": "" // no sample text };

mwCustomEditButtons[mwCustomEditButtons.length] = { // bulleted list "imageFile": "images/c/c4/Btn_toolbar_bulleted_list.png", // Bulleted list, 23x22 pixels "speedTip": "Bulleted list", // tooltip text "tagOpen": "*", // text at block beginning "tagClose": "",     // text at block end (if any) "sampleText": "Bulleted list" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // numbered list "imageFile": "images/b/b2/Btn_toolbar_Numbered_List.png", // Numbered list, 23x22 pixels "speedTip": "Numbered list", // tooltip text "tagOpen": "#", // text at block beginning "tagClose": "",     // text at block end (if any) "sampleText": "Numbered list" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = {  // spacer, separate button groups "imageFile": "images/b/b1/Button_spacer.png", // white image, 12x22 pixels "speedTip": "", // no tooltip "tagOpen": "", // no text at beginning "tagClose": "",     // no text at the end "sampleText": "" // no sample text };

mwCustomEditButtons[mwCustomEditButtons.length] = { // header, full line across page "imageFile": "images/0/0d/Button_hr.png", // header, 23x22 pixels "speedTip": "Draws full line across page, not to be confused with heading. Use sparingly.", // tooltip text "tagOpen": '\n\n', // text at block beginning "tagClose": "",     // text at block end (if any) "sampleText": "" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // signature "imageFile": "images/5/51/Button_signature.png", // signature, 23x22 pixels "speedTip": "Signature. Enters your username with time and date. Select Show Preview to see effect.", // tooltip text "tagOpen": "--\~\~\~\~", // text at block beginning "tagClose": "",     // text at block end (if any) "sampleText": "" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = {  // spacer, separate button groups "imageFile": "images/b/b1/Button_spacer.png", // white image, 12x22 pixels "speedTip": "", // no tooltip "tagOpen": "", // no text at beginning "tagClose": "",     // no text at the end "sampleText": "" // no sample text };

mwCustomEditButtons[mwCustomEditButtons.length] = { // No wiki "imageFile": "images/8/82/Nowiki_icon.png", // No wiki, 23x22 pixels "speedTip": "Forces text to be shown as-is. Prevents wiki from misinterpreting text as a formatting command.", // tooltip text "tagOpen": " ", // text at block beginning "tagClose": " ",     // text at block end (if any) "sampleText": "<!- display this text -->" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = { // redirect "imageFile": "images/c/c8/Button_redirect.png", // redirect, 23x22 pixels "speedTip": "Redirect to a different page.", // tooltip text "tagOpen": "#REDIRECT ", // text at block beginning	"tagClose": "",     // text at block end (if any) "sampleText": "Different page" // sample text if nothing selected };

mwCustomEditButtons[mwCustomEditButtons.length] = {  // spacer, separate button groups "imageFile": "images/b/b1/Button_spacer.png", // white image, 12x22 pixels "speedTip": "", // no tooltip "tagOpen": "", // no text at beginning "tagClose": "",     // no text at the end "sampleText": "" // no sample text };

mwCustomEditButtons[mwCustomEditButtons.length] = { // help "imageFile": "images/1/14/Button_question2.png", // help, 23x22 pixels "speedTip": 'Tips: Use "Show preview" as many times as necessary to view and edit before "Save page". \/\/ Copy from working examples- Open pages for edit in a new browser tab or window, copy and paste into article. \/\/ Use the help available on the left sidebar, under "support". \/\/ Content is more important than format! Enter content and continue, then ask for assistance- others will be glad to help.', // tooltip text "tagOpen": "", // no text at block beginning "tagClose": "",     // no text at block end "sampleText": "" // no sample text }; }