User:Rjwatts

// //============================================================ // en: ADD SOME EXTRA BUTTONS TO THE EDITPANEL // de: FÜGE NEUE BUTTON IN DIE WERKZEUGLEISTE //============================================================ // Vorschläge für neue Buttons werden gerne entgegengenommen // Die Reihenfolge und Anzahl der Buttons ist über die (alphabetische) Variable XEBOrder wählbar.

if (typeof XEBOrder == 'undefined') // can be modified XEBOrder="A,B,D,C,D1,F,U,S,I1,I2,J1,E,G,Q,W,X,K,L,M,H,O,R,T,V";

if (XEBOrder == 'all') XEBOrder="A,B,D,C,D1,F,U,S,I1,I2,J1,E,G,Q,W,X,K,L,M,H,O,R,T,V,FS,J2,N,P,P1,R1,R2,R3,R4,T1,Y1,Y2,Z,AI";

//fills the variable mwCustomEditButtons (s. function in /wikibits.js), with buttons for the Toolbar function addCustomButton(imageFile, speedTip, tagOpen, tagClose, sampleText){ mwCustomEditButtons.push({ "imageFile": imageFile,  "speedTip": speedTip,  "tagOpen": tagOpen,  "tagClose": tagClose,  "sampleText": sampleText}); }

var Isrc='http://upload.wikimedia.org/wikipedia/commons/';

var BDict={ 'A':['e/e9/Button_headline2.png','Secondary headline','\n===','===','Secondary headline'], 'B':['1/13/Button_enter.png','Line break',' ',,], 'C':['5/5f/Button_center.png','Center',' \n','\n<\/div>','Centred text'], 'D':['e/ea/Button_align_left.png','Left-Align',' \n','\n<\/div>','Left-aligned text'], 'D1':['a/a5/Button_align_right.png','Right-Align',' \n','\n<\/div>','Right-aligned text'], 'E':['0/04/Button_array.png','Table','\n{| class="wikitable" \n|- \n| 1 || 2\n|- \n| 3 || 4','\n|}\n',''], 'F':['1/1e/Button_font_color.png','Insert coloured text','Coloured text<\/span>','ColourName'], 'FS':['1/1b/Button_miss_signature.png','Unsigned post',,,'user name or IP'], 'G':, 'H':['7/74/Button_comment.png','Comment',"",'Comment'], 'I1':['6/6a/Button_sup_letter.png','Superscript',' ','<\/sup>','Superscript text'], 'I2':['a/aa/Button_sub_letter.png','Subscript',' ','<\/sub>','Subscript text'], 'J1':['5/58/Button_small.png','Small',' ','<\/small>','Small Text'], 'J2':['5/56/Button_big.png','Big text',' ','<\/big>','Big text'], 'K':['b/b4/Button_category03.png','Category',"",'Category name'], 'L':['8/8e/Button_shifting.png','Insert tab(s)',':','',':'], 'M':['f/fd/Button_blockquote.png','Insert block of quoted text','\n','\n<\/blockquote>','Block quote'], 'N':['4/4b/Button_nbsp.png','nonbreaking space',' ',,], 'O':['2/23/Button_code.png','Insert code',' ','<\/code>','Code'], 'P':['3/3c/Button_pre.png','Pre formatted Text',' ','<\/pre>','Pre formatted text'], 'P1':['9/93/Button_sub_link.png','Insert link to sub-page','','/Sub_Page','Page'], 'Q':['d/d3/Button_definition_list.png','Insert definition list','\n; ','\n: Item 1\n: Item 2','Definition'], 'R':['7/79/Button_reflink.png','Insert a reference',' ','Reference material'], 'R3':['2/28/Button_reflink_advanced_3.gif','No reference material',,'"/>',], 'R4':['9/9a/Button_references.png','Reference footer',"\n==Notes==\n\n\n \n ",,], 'S':['c/c9/Button_strike.png','Strikeout',' ','<\/s>','Struck out text'], 'T':['e/eb/Button_plantilla.png','Template','','Template name'], 'T1':['3/30/Tt_icon.png','Teletype text','','<\/tt>','Teletype Text'], 'U':['f/fd/Button_underline.png','Underlined'," ","<\/u>",'Underlined text'], 'V':['c/c8/Button_redirect.png','Redirect',"#REDIRECT ","",'Article Name'], 'W':['8/88/Btn_toolbar_enum.png','Numbering',"\n# ","\n# Element 2\n# Element 3",'Element 1'], 'X':['1/11/Btn_toolbar_liste.png','List',"\n* ","\n* Element B\n* Element C",'Element A'], 'Y1':['c/ce/Button_no_include.png','No Include'," ","<\/noinclude>",'Text'], 'Y2':['7/79/Button_include.png','Include only'," ","<\/includeonly>",'Text'], 'Z':['3/35/Button_substitute.png','Substitute',"",'Template'], 'AI': }

XEBOrder=XEBOrder.split(","); for (var b in XEBOrder) { var bc = BDict[XEBOrder[b]]; addCustomButton(Isrc+bc[0],bc[1],bc[2],bc[3],bc[4]) } //