/* Any JavaScript here will be loaded for all users on every page load. */

//<pre>
// Version: 1.0
// Tested successfully on 1.10, 1.11, 1.11.1
// Simple button add based on a derivative of "MarkS/Extra edit buttons"
//   http://en.wikipedia.org/wiki/User:MarkS/Extra_edit_buttons
//
// Button images should go into:  ./skins/common/images/
//
//  ***  IMPORTANT  ***
// You will need to replace /wiki on each line to your own webserver's wikipath root


 if (mwCustomEditButtons) {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_code.png",
     "speedTip": "Code format",
     "tagOpen": "<b><code>",
     "tagClose": "</code></b>",
     "sampleText": "Terminal code"}; 

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Br.png",
     "speedTip": "Overflow code",
     "tagOpen": "<pre style='overflow:auto;'>",
     "tagClose": "</pre>",
     "sampleText": "\n ...code...\n"}; 

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_definition_list.png",
     "speedTip": "List with code",
     "tagOpen": "<ol>",
     "tagClose": "</ol>",
     "sampleText": "\n<li>instructions</li>\n code\n<li>instructions</li>\n code\n<li>instructions</li>\n code\n<li>instructions</li>\n code\n<li>instructions</li>\n code\n"}; 

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_category_plus.png",
     "speedTip": "Button Image",
     "tagOpen": "<span class='key'>",
     "tagClose": "</span>",
     "sampleText": "CTRL"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_no_license.png",
     "speedTip": "Notation",
     "tagOpen": "<blockquote>\n<br /><hr>[[Image:Info_icon40.png|left]]\n<center><i>",
     "tagClose": "</i></center>\n<br clear='all' /><hr><br />\n</blockquote>",
     "sampleText": "Note..."};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_redirect.png",
     "speedTip": "Redirect",
     "tagOpen": "#REDIRECT [[",
     "tagClose": "]]",
     "sampleText": "Insert text"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_strike.png",
     "speedTip": "Strike",
     "tagOpen": "<s>",
     "tagClose": "</s>",
     "sampleText": "Strike-through text"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_enter.png",
     "speedTip": "Line break",
     "tagOpen": "<br />",
     "tagClose": "",
     "sampleText": ""};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_upper_letter.png",
     "speedTip": "Superscript",
     "tagOpen": "<sup>",
     "tagClose": "</sup>",
     "sampleText": "Superscript text"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_lower_letter.png",
     "speedTip": "Subscript",
     "tagOpen": "<sub>",
     "tagClose": "</sub>",
     "sampleText": "Subscript text"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_small.png",
     "speedTip": "Small",
     "tagOpen": "<small>",
     "tagClose": "</small>",
     "sampleText": "Small Text"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_comment.png",
     "speedTip": "Insert hidden Comment",
     "tagOpen": "<!-- ",
     "tagClose": " -->",
     "sampleText": "Comment"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_gallery.png",
     "speedTip": "Insert a picture gallery",
     "tagOpen": "\n<gallery>\n",
     "tagClose": "\n</gallery>",
     "sampleText": "Image:Example.jpg|Caption1\nImage:Example.jpg|Caption2"};
 
  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "/wiki/skins/common/images/Button_blockquote.png",
    "speedTip": "Insert a document link",
    "tagOpen": "[[media:",
    "tagClose": "]]",
    "sampleText": "filename|text you want to display"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/wiki/skins/common/images/Button_insert_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": "/wiki/skins/common/images/Button_hide_comment.png",
     "speedTip": "Protected Page",
     "tagOpen": "[[Category:Protected]]",
     "tagClose": "",
     "sampleText": ""}; 

 }
 
//</pre>
