MediaWiki:Common.js
Revision as of 20:57, 6 September 2010 by Kevindunn (talk | contribs) (Created page with "→Any JavaScript here will be loaded for all users on every page load.: if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": ...")
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* Any JavaScript here will be loaded for all users on every page load. */
if (mwCustomEditButtons)
{
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://modelling3e4.connectmv.com/extensions/toolbar_images/button_tt.png",
"speedTip": "Insert teletype text here",
"tagOpen": "<tt>",
"tagClose": "</tt>",
"sampleText": "Insert teletype text here"}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://modelling3e4.connectmv.com/extensions/toolbar_images/button_comment.png",
"speedTip": "Comment visible only for editors",
"tagOpen": "<!-- ",
"tagClose": " -->",
"sampleText": "Insert comment here"}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://modelling3e4.connectmv.com/extensions/toolbar_images/button_source_code.png",
"speedTip": "Colour-coded source code",
"tagOpen": "<syntaxhighlight lang=\"matlab\">\n",
"tagClose": "\n</syntaxhighlight>",
"sampleText": "Place source code here; replace lang if necessary"}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://modelling3e4.connectmv.com/extensions/toolbar_images/button_definition.png",
"speedTip": "Insert definition(s)",
"tagOpen": "; ",
"tagClose": "\n: ",
"sampleText": "Words to define here (definition goes after the colon)"}
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://modelling3e4.connectmv.com/extensions/toolbar_images/button_table.png",
"speedTip": "Insert a table",
"tagOpen": "{| 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] = {
"imageFile": "http://modelling3e4.connectmv.com/extensions/toolbar_images/button_category.png",
"speedTip": "Insert a category for this page",
"tagOpen": "[[Category: ",
"tagClose": "]]",
"sampleText": "Needs work"}
}