MediaWiki:Common.js
From Education
Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh); Konqueror: click Reload or press F5; Opera: clear the cache in Tools → Preferences; Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Any JavaScript here will be loaded for all users on every page load. */
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "/skins/common/custom-images/Button_strike.png",
"speedTip": "Strike through",
"tagOpen": "<s>",
"tagClose": "</s>",
"sampleText": "Strike-through text"}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "/skins/common/custom-images/Button_enter.png",
"speedTip": "Line break",
"tagOpen": "",
"tagClose": " <br />",
"sampleText": ""}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "/skins/common/custom-images/Button_upper_letter.png",
"speedTip": "Superscript",
"tagOpen": "<sup>",
"tagClose": "</sup>",
"sampleText": "Superscript text"}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "/skins/common/custom-images/Button_lower_letter.png",
"speedTip": "Subscript",
"tagOpen": "<sub>",
"tagClose": "</sub>",
"sampleText": "Subscript text"}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "/skins/common/custom-images/Button_internal_link.png",
"speedTip": "Link to a wiki page",
"tagOpen": "[[",
"tagClose": "]]",
"sampleText": "Wiki page"}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "/skins/common/custom-images/Button_external_link.png",
"speedTip": "Link to a web page",
"tagOpen": "[",
"tagClose": "]",
"sampleText": "http://website.com Displayed text"}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "/skins/common/custom-images/Button_insert_table.png",
"speedTip": "Insert a table",
"tagOpen": "{| class=\"wikitable\" \n|-",
"tagClose": "\n|}",
"sampleText": "\n! 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] = {
"imageFile": "/skins/common/custom-images/Button_list.png",
"speedTip": "Start a bulleted list",
"tagOpen": "* ",
"tagClose": "",
"sampleText": "Item one\n* Item two\n* Item three"}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "/skins/common/custom-images/Button_enumerate.png",
"speedTip": "Start a numbered list",
"tagOpen": "# ",
"tagClose": "",
"sampleText": "Item one\n# Item two\n# Item three"}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "/skins/common/images/button_math.png",
"speedTip": "Mathematical formula (LaTex)",
"tagOpen": "<math>",
"tagClose": "</math>",
"sampleText": "Insert formula here"}
}