customToolbar.js: Unterschied zwischen den Versionen
Aus RMG-Wiki
Zeile 1: | Zeile 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
var XEBOrder=[]; | var XEBOrder=[]; | ||
var attributes = ["imageFile","speedTip","tagOpen","tagClose","sampleText"]; | var attributes = ["imageFile","speedTip","tagOpen","tagClose","sampleText"]; | ||
− | + | ||
− | + | ||
− | + | ||
function addCustomButton(){ | function addCustomButton(){ | ||
var a = {}; | var a = {}; | ||
Zeile 16: | Zeile 7: | ||
mwCustomEditButtons.push(a); | mwCustomEditButtons.push(a); | ||
}; | }; | ||
− | + | ||
if (typeof usersignature == 'undefined') var usersignature = '-- \~\~\~\~'; | if (typeof usersignature == 'undefined') var usersignature = '-- \~\~\~\~'; | ||
− | + | ||
var Isrc='http://upload.wikimedia.org/wikipedia/commons/'; | var Isrc='http://upload.wikimedia.org/wikipedia/commons/'; | ||
var BDict={ | var BDict={ | ||
− | |||
− | |||
'A':['e/e9/Button_headline2.png','Sekundäre Überschrift','\n=== ',' ===','Sekundäre Überschrift'], | 'A':['e/e9/Button_headline2.png','Sekundäre Überschrift','\n=== ',' ===','Sekundäre Überschrift'], | ||
'A3':['/3/3a/Button_headline3.png','Untergeordnete Überschrift','\n==== ',' ====','Untergeordnete Überschrift'], | 'A3':['/3/3a/Button_headline3.png','Untergeordnete Überschrift','\n==== ',' ====','Untergeordnete Überschrift'], | ||
'B':['1/13/Button_enter.png','Zeilenumbruch','<br />','',''], | 'B':['1/13/Button_enter.png','Zeilenumbruch','<br />','',''], | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
'E':['0/04/Button_array.png','Tabelle','\n{| class="prettytable" \n|- \n| 1 || 2\n|- \n| 3 || 4','\n|}\n',''], | 'E':['0/04/Button_array.png','Tabelle','\n{| class="prettytable" \n|- \n| 1 || 2\n|- \n| 3 || 4','\n|}\n',''], | ||
'F':['8/8f/Button_poeme.png','Farbiger Text','<span style="color: color">','<\/span>','Farbig'], | 'F':['8/8f/Button_poeme.png','Farbiger Text','<span style="color: color">','<\/span>','Farbig'], | ||
− | |||
'G':['9/9e/Btn_toolbar_gallery.png','Bildergalerie',"\n<gallery>\nBild:M63.jpg|[[M63]]\nBild:Mona Lisa.jpg|[[Mona Lisa]]\nBild:Truite arc-en-ciel.jpg|Eine [[Forelle ]]\n<\/gallery>","",''], | 'G':['9/9e/Btn_toolbar_gallery.png','Bildergalerie',"\n<gallery>\nBild:M63.jpg|[[M63]]\nBild:Mona Lisa.jpg|[[Mona Lisa]]\nBild:Truite arc-en-ciel.jpg|Eine [[Forelle ]]\n<\/gallery>","",''], | ||
'H':['7/74/Button_comment.png','Versteckter Kommentar',"<!--","-->",'Versteckt'], | 'H':['7/74/Button_comment.png','Versteckter Kommentar',"<!--","-->",'Versteckt'], | ||
− | |||
'I1':['6/6a/Button_sup_letter.png','Hochgestellter Text (superscript)','<sup>','<\/sup>','Hochgestellt'], | 'I1':['6/6a/Button_sup_letter.png','Hochgestellter Text (superscript)','<sup>','<\/sup>','Hochgestellt'], | ||
'I2':['a/aa/Button_sub_letter.png','Tiefgestellter Text (subscript)','<sub>','<\/sub>','Tiefgestellt'], | 'I2':['a/aa/Button_sub_letter.png','Tiefgestellter Text (subscript)','<sub>','<\/sub>','Tiefgestellt'], | ||
Zeile 47: | Zeile 24: | ||
'J2':['5/56/Button_big.png','Größerer Text (big)','<big>','<\/big>','Groß'], | 'J2':['5/56/Button_big.png','Größerer Text (big)','<big>','<\/big>','Groß'], | ||
'K':['b/b4/Button_category03.png','Kategorie',"[[Kategorie:","]]",'Name der Kategorie'], | 'K':['b/b4/Button_category03.png','Kategorie',"[[Kategorie:","]]",'Name der Kategorie'], | ||
− | |||
− | |||
'M':['f/fd/Button_blockquote.png','Markiert ein Zitat mit Absatz','<blockquote style="border: 1px solid blue; padding: 2em;">\n','\n<\/blockquote>','Text'], | 'M':['f/fd/Button_blockquote.png','Markiert ein Zitat mit Absatz','<blockquote style="border: 1px solid blue; padding: 2em;">\n','\n<\/blockquote>','Text'], | ||
− | |||
− | |||
− | |||
'P':['3/3c/Button_pre.png','Vorformatierter Text','<pre>','<\/pre>','Präformatierter Text'], | 'P':['3/3c/Button_pre.png','Vorformatierter Text','<pre>','<\/pre>','Präformatierter Text'], | ||
− | |||
− | |||
− | |||
− | |||
'Q':['d/d3/Button_definition_list.png','Definitionsliste','\n; ',' : ','Text'], | 'Q':['d/d3/Button_definition_list.png','Definitionsliste','\n; ',' : ','Text'], | ||
− | |||
− | |||
− | |||
'R':['7/79/Button_reflink.png','Markiere eine Referenz','<ref>','<\/ref>','Bezugsangabe'], | 'R':['7/79/Button_reflink.png','Markiere eine Referenz','<ref>','<\/ref>','Bezugsangabe'], | ||
'R1':['c/c4/Button_ref.png','Referenz mit Name','<ref name="">','<\/ref>','Bezugsangabe'], | 'R1':['c/c4/Button_ref.png','Referenz mit Name','<ref name="">','<\/ref>','Bezugsangabe'], | ||
'R2':['f/fe/Button_refs.png','Wiederholungs-Referenz','<ref name="','"/>','Referenzname'], | 'R2':['f/fe/Button_refs.png','Wiederholungs-Referenz','<ref name="','"/>','Referenzname'], | ||
'R3':['9/9a/Button_references.png','Referenz-Footer','\n== Einzelnachweise ==\n<references/>\n','',''], | 'R3':['9/9a/Button_references.png','Referenz-Footer','\n== Einzelnachweise ==\n<references/>\n','',''], | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
'T':['e/eb/Button_plantilla.png','Vorlage','{{','}}','Vorlagenname'], | 'T':['e/eb/Button_plantilla.png','Vorlage','{{','}}','Vorlagenname'], | ||
− | |||
− | |||
'U':['f/fd/Button_underline.png','Unterstreichen',"<u>","<\/u>",'Unterstrichener Text'], | 'U':['f/fd/Button_underline.png','Unterstreichen',"<u>","<\/u>",'Unterstrichener Text'], | ||
− | |||
− | |||
'V':['c/c8/Button_redirect.png','Weiterleitung (Redirect)',"#REDIRECT [[","]]",'Ziel einfügen'], | 'V':['c/c8/Button_redirect.png','Weiterleitung (Redirect)',"#REDIRECT [[","]]",'Ziel einfügen'], | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
'W':['8/88/Btn_toolbar_enum.png','Nummerierung',"\n# Element 1\n# Element 2\n# Element 3","",''], | 'W':['8/88/Btn_toolbar_enum.png','Nummerierung',"\n# Element 1\n# Element 2\n# Element 3","",''], | ||
'X':['1/11/Btn_toolbar_liste.png','Liste',"\n* Element A\n* Element B\n* Element C","",''], | 'X':['1/11/Btn_toolbar_liste.png','Liste',"\n* Element A\n* Element B\n* Element C","",''], | ||
− | |||
− | |||
− | |||
− | |||
− | |||
}; | }; | ||
− | + | ||
− | if (typeof customEditButtons!='string') | + | if (typeof customEditButtons!='string') |
XEBOrder="A,A3,B,E,F,G,H,I1,I2,J1,K,M,Q,R,R1,R2,R3,T,U,V,W,X".split(","); | XEBOrder="A,A3,B,E,F,G,H,I1,I2,J1,K,M,Q,R,R1,R2,R3,T,U,V,W,X".split(","); | ||
else if (customEditButtons.toLowerCase()=='all') | else if (customEditButtons.toLowerCase()=='all') | ||
for (b in BDict) XEBOrder.push(b); | for (b in BDict) XEBOrder.push(b); | ||
else XEBOrder=customEditButtons.split(","); | else XEBOrder=customEditButtons.split(","); | ||
− | + | ||
− | + | ||
function initButtons(){ | function initButtons(){ | ||
var bc,d; | var bc,d; | ||
− | for (b in BDict) BDict[b][0] = Isrc+BDict[b][0]; | + | for (b in BDict) BDict[b][0] = Isrc+BDict[b][0]; |
− | + | ||
if (typeof myButtons=='object') | if (typeof myButtons=='object') | ||
for (b in myButtons) BDict[b] = myButtons[b]; // custom user buttons | for (b in myButtons) BDict[b] = myButtons[b]; // custom user buttons | ||
− | |||
for (b in mwEditButtons) { // add standard buttons for full XEB order changing | for (b in mwEditButtons) { // add standard buttons for full XEB order changing | ||
BDict[b]=[]; | BDict[b]=[]; | ||
− | |||
for (d in attributes) BDict[b].push(mwEditButtons[b][attributes[d]]); | for (d in attributes) BDict[b].push(mwEditButtons[b][attributes[d]]); | ||
} | } | ||
− | |||
for (i=0;i<XEBOrder.length;i++) { | for (i=0;i<XEBOrder.length;i++) { | ||
bc = BDict[XEBOrder[i]]; | bc = BDict[XEBOrder[i]]; | ||
− | |||
addCustomButton(bc[0],bc[1],bc[2],bc[3],bc[4]); | addCustomButton(bc[0],bc[1],bc[2],bc[3],bc[4]); | ||
− | |||
− | |||
} | } | ||
− | |||
eraseButtons(); | eraseButtons(); | ||
}; | }; | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
function generateTable(caption, exhead, nbCol, nbRow, exfield, align){ | function generateTable(caption, exhead, nbCol, nbRow, exfield, align){ | ||
var code = "\n"; | var code = "\n"; | ||
Zeile 152: | Zeile 81: | ||
return false | return false | ||
}; | }; | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
function popupTable(){ | function popupTable(){ | ||
var popup = window.open('about:blank','WPtable','height=400,width=400,scrollbars=yes'); | var popup = window.open('about:blank','WPtable','height=400,width=400,scrollbars=yes'); | ||
Zeile 170: | Zeile 94: | ||
+'window.close()}<\/script>'; | +'window.close()}<\/script>'; | ||
− | popup.document.write('<html><head><title> | + | popup.document.write('<html><head><title>Neue Tabelle<\/title>' |
− | + | ||
− | + | ||
+ javaCode +'<\/head><body>' | + javaCode +'<\/head><body>' | ||
+'<p><b>Gib die Parameterwerte für die Tabelle ein: <\/b><\/p><hr>' | +'<p><b>Gib die Parameterwerte für die Tabelle ein: <\/b><\/p><hr>' | ||
Zeile 190: | Zeile 112: | ||
return false | return false | ||
}; | }; | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
function eraseButtons(){ | function eraseButtons(){ | ||
if(typeof rmEditButtons!='object') return; | if(typeof rmEditButtons!='object') return; | ||
if (typeof rmEditButtons[0] == 'string' && rmEditButtons[0].toLowerCase() == 'all') | if (typeof rmEditButtons[0] == 'string' && rmEditButtons[0].toLowerCase() == 'all') | ||
return mwEditButtons=[]; | return mwEditButtons=[]; | ||
− | |||
for(i=0;i<rmEditButtons.length;i++){ | for(i=0;i<rmEditButtons.length;i++){ | ||
var n=rmEditButtons[i]-i; | var n=rmEditButtons[i]-i; | ||
Zeile 213: | Zeile 130: | ||
} | } | ||
}; | }; | ||
− | + | ||
addOnloadHook(initButtons); | addOnloadHook(initButtons); | ||
− | + | ||
− | + | ||
function extendButtons(){ | function extendButtons(){ | ||
if(!(allEditButtons = document.getElementById('toolbar'))) return false; | if(!(allEditButtons = document.getElementById('toolbar'))) return false; | ||
if(typeof editform == 'undefined') | if(typeof editform == 'undefined') | ||
if(!(window.editform = document.editform)) return false; | if(!(window.editform = document.editform)) return false; | ||
− | + | ||
XEBOrder.getIndex = function (item){ | XEBOrder.getIndex = function (item){ | ||
if(is_gecko) return this.indexOf(item); | if(is_gecko) return this.indexOf(item); | ||
Zeile 232: | Zeile 148: | ||
allEditButtons = allEditButtons.getElementsByTagName('img'); | allEditButtons = allEditButtons.getElementsByTagName('img'); | ||
− | + | ||
var bu_len = mwEditButtons.length; | var bu_len = mwEditButtons.length; | ||
var c=0; | var c=0; | ||
− | + | ||
if(!allEditButtons.length) return false; | if(!allEditButtons.length) return false; | ||
− | + | ||
− | + | ||
if (bu_len>0){ | if (bu_len>0){ | ||
if(typeof rmEditButtons=='object' && rmEditButtons.pop()==10) c=1; | if(typeof rmEditButtons=='object' && rmEditButtons.pop()==10) c=1; | ||
mwEditButtons[bu_len-2+c].tagOpen=usersignature; | mwEditButtons[bu_len-2+c].tagOpen=usersignature; | ||
if(usersignature != '-- \~\~\~\~') | if(usersignature != '-- \~\~\~\~') | ||
− | allEditButtons[bu_len- | + | allEditButtons[bu_len-2+c].src=Isrc+'d/d1/Button_mysignature.png'; |
} | } | ||
− | + | ||
− | + | ||
if((c=XEBOrder.getIndex('F')) != -1) allEditButtons[bu_len+c].onclick=popupTable; | if((c=XEBOrder.getIndex('F')) != -1) allEditButtons[bu_len+c].onclick=popupTable; | ||
− | + | ||
− | + | ||
c=XEBOrder.getIndex('W'); | c=XEBOrder.getIndex('W'); | ||
if(c != -1) | if(c != -1) | ||
Zeile 261: | Zeile 174: | ||
}; | }; | ||
− | |||
if((c = XEBOrder.getIndex('T1')) != -1) allEditButtons[bu_len+c].width = 6; | if((c = XEBOrder.getIndex('T1')) != -1) allEditButtons[bu_len+c].width = 6; | ||
}; | }; | ||
− | + | ||
if(!wgIsArticle) // only if edit | if(!wgIsArticle) // only if edit | ||
hookEvent("load", extendButtons); | hookEvent("load", extendButtons); | ||
− |
Version vom 1. August 2008, 10:07 Uhr
var XEBOrder=[]; var attributes = ["imageFile","speedTip","tagOpen","tagClose","sampleText"]; function addCustomButton(){ var a = {}; for (d in attributes) a[attributes[d]] = arguments[d]; mwCustomEditButtons.push(a); }; if (typeof usersignature == 'undefined') var usersignature = '-- \~\~\~\~'; var Isrc='http://upload.wikimedia.org/wikipedia/commons/'; var BDict={ 'A':['e/e9/Button_headline2.png','Sekundäre Überschrift','\n=== ',' ===','Sekundäre Überschrift'], 'A3':['/3/3a/Button_headline3.png','Untergeordnete Überschrift','\n==== ',' ====','Untergeordnete Überschrift'], 'B':['1/13/Button_enter.png','Zeilenumbruch','<br />','',''], 'E':['0/04/Button_array.png','Tabelle','\n{| class="prettytable" \n|- \n| 1 || 2\n|- \n| 3 || 4','\n|}\n',''], 'F':['8/8f/Button_poeme.png','Farbiger Text','<span style="color: color">','<\/span>','Farbig'], 'G':['9/9e/Btn_toolbar_gallery.png','Bildergalerie',"\n<gallery>\nBild:M63.jpg|[[M63]]\nBild:Mona Lisa.jpg|[[Mona Lisa]]\nBild:Truite arc-en-ciel.jpg|Eine [[Forelle ]]\n<\/gallery>","",''], 'H':['7/74/Button_comment.png','Versteckter Kommentar',"<!--","-->",'Versteckt'], 'I1':['6/6a/Button_sup_letter.png','Hochgestellter Text (superscript)','<sup>','<\/sup>','Hochgestellt'], 'I2':['a/aa/Button_sub_letter.png','Tiefgestellter Text (subscript)','<sub>','<\/sub>','Tiefgestellt'], 'J1':['5/58/Button_small.png','Kleingeschriebener Text (small)','<small>','<\/small>','Klein'], 'J2':['5/56/Button_big.png','Größerer Text (big)','<big>','<\/big>','Groß'], 'K':['b/b4/Button_category03.png','Kategorie',"[[Kategorie:","]]",'Name der Kategorie'], 'M':['f/fd/Button_blockquote.png','Markiert ein Zitat mit Absatz','<blockquote style="border: 1px solid blue; padding: 2em;">\n','\n<\/blockquote>','Text'], 'P':['3/3c/Button_pre.png','Vorformatierter Text','<pre>','<\/pre>','Präformatierter Text'], 'Q':['d/d3/Button_definition_list.png','Definitionsliste','\n; ',' : ','Text'], 'R':['7/79/Button_reflink.png','Markiere eine Referenz','<ref>','<\/ref>','Bezugsangabe'], 'R1':['c/c4/Button_ref.png','Referenz mit Name','<ref name="">','<\/ref>','Bezugsangabe'], 'R2':['f/fe/Button_refs.png','Wiederholungs-Referenz','<ref name="','"/>','Referenzname'], 'R3':['9/9a/Button_references.png','Referenz-Footer','\n== Einzelnachweise ==\n<references/>\n','',''], 'T':['e/eb/Button_plantilla.png','Vorlage','{{','}}','Vorlagenname'], 'U':['f/fd/Button_underline.png','Unterstreichen',"<u>","<\/u>",'Unterstrichener Text'], 'V':['c/c8/Button_redirect.png','Weiterleitung (Redirect)',"#REDIRECT [[","]]",'Ziel einfügen'], 'W':['8/88/Btn_toolbar_enum.png','Nummerierung',"\n# Element 1\n# Element 2\n# Element 3","",''], 'X':['1/11/Btn_toolbar_liste.png','Liste',"\n* Element A\n* Element B\n* Element C","",''], }; if (typeof customEditButtons!='string') XEBOrder="A,A3,B,E,F,G,H,I1,I2,J1,K,M,Q,R,R1,R2,R3,T,U,V,W,X".split(","); else if (customEditButtons.toLowerCase()=='all') for (b in BDict) XEBOrder.push(b); else XEBOrder=customEditButtons.split(","); function initButtons(){ var bc,d; for (b in BDict) BDict[b][0] = Isrc+BDict[b][0]; if (typeof myButtons=='object') for (b in myButtons) BDict[b] = myButtons[b]; // custom user buttons for (b in mwEditButtons) { // add standard buttons for full XEB order changing BDict[b]=[]; for (d in attributes) BDict[b].push(mwEditButtons[b][attributes[d]]); } for (i=0;i<XEBOrder.length;i++) { bc = BDict[XEBOrder[i]]; addCustomButton(bc[0],bc[1],bc[2],bc[3],bc[4]); } eraseButtons(); }; function generateTable(caption, exhead, nbCol, nbRow, exfield, align){ var code = "\n"; code += '{| class="prettytable sortable" ' + align + '\n' + caption + exhead; if (exfield) code += '!\n'; for (i=1;i<nbCol+1;i++) code += '! FELD ' + i + '\n'; var items = 0; for (var j=0;j<nbRow;j++){ if (exfield) { items++; code += '|-\n! style="background: #FFDDDD;"|ITEM ' + items + '\n'; } else code += '|-\n'; for (i=0;i<nbCol;i++) code += '| Element\n'; } code += '|}\n'; insertTags('','', code); editform.elements['wpSummary'].value+=' table+'; return false }; function popupTable(){ var popup = window.open('about:blank','WPtable','height=400,width=400,scrollbars=yes'); var javaCode = '<script type="text\/javascript">function insertCode(){' +'var caption = (document.paramForm.inputCaption.checked)?"\|\+ TABLE CAPTION \\n":""; ' +'var exhead = (document.paramForm.inputHead.checked)?\'\|\- style=\"background: #DDFFDD;\"\\n\':""; ' +'var row = parseInt(document.paramForm.inputRow.value); ' +'var col = parseInt(document.paramForm.inputCol.value); ' +'var exfield = document.paramForm.inputItems.checked; ' +'var align = (document.paramForm.inputAlign.checked)?\'align="center"\':""; ' +'window.opener.generateTable(caption,exhead,col,row,exfield,align); ' +'window.close()}<\/script>'; popup.document.write('<html><head><title>Neue Tabelle<\/title>' + javaCode +'<\/head><body>' +'<p><b>Gib die Parameterwerte für die Tabelle ein: <\/b><\/p><hr>' +'<form name="paramForm">' +'Tabellen Überschrift: <input type="checkbox" name="inputCaption"><p\/>' +'Tabellen Ausrichtung: center<input type="checkbox" name="inputAlign"><p\/>' +'Tabellen Überschrift: colored<input type="checkbox" name="inputHead"><p\/>' +'Anzahl von Zeilen: <input type="text" name="inputRow" value="3" size="2"><p\/>' +'Anzahl von Spalten: <input type="text" name="inputCol" value="3" size="2"><p\/>' +'Beschreibungsspalte: <input type="checkbox" name="inputItems" ><p\/>' +'<\/form"><hr>' +'<i>Die Standardtabelle erlaubt für alle Felder nur Zahlen.<\/i><p\/>' +'<p><a href="javascript:insertCode()"> Füge die Tabelle ein<\/a> |' +' <a href="javascript:self.close()">Abbruch<\/a><\/p>' +'<\/body><\/html>'); popup.document.close(); return false }; function eraseButtons(){ if(typeof rmEditButtons!='object') return; if (typeof rmEditButtons[0] == 'string' && rmEditButtons[0].toLowerCase() == 'all') return mwEditButtons=[]; for(i=0;i<rmEditButtons.length;i++){ var n=rmEditButtons[i]-i; if(n>=0 && n<mwEditButtons.length){ if(n<mwEditButtons.length){ var x = -1; while((++x)<mwEditButtons.length) if(x>=n) mwEditButtons[x] = mwEditButtons[x+1]; } mwEditButtons.pop(); } } }; addOnloadHook(initButtons); function extendButtons(){ if(!(allEditButtons = document.getElementById('toolbar'))) return false; if(typeof editform == 'undefined') if(!(window.editform = document.editform)) return false; XEBOrder.getIndex = function (item){ if(is_gecko) return this.indexOf(item); else //is IE (Opera < 9) for (var i=0;i < this.length;i++) if (this[i]==item) return Number(i); return -1 } var searchbox = allEditButtons.getElementsByTagName('span')[0]; if (searchbox) allEditButtons.appendChild(searchbox) // pay Zocky/Search Box allEditButtons = allEditButtons.getElementsByTagName('img'); var bu_len = mwEditButtons.length; var c=0; if(!allEditButtons.length) return false; if (bu_len>0){ if(typeof rmEditButtons=='object' && rmEditButtons.pop()==10) c=1; mwEditButtons[bu_len-2+c].tagOpen=usersignature; if(usersignature != '-- \~\~\~\~') allEditButtons[bu_len-2+c].src=Isrc+'d/d1/Button_mysignature.png'; } if((c=XEBOrder.getIndex('F')) != -1) allEditButtons[bu_len+c].onclick=popupTable; c=XEBOrder.getIndex('W'); if(c != -1) allEditButtons[bu_len+c].onclick=function(){ if (a = window.prompt("Wohin soll der Redirect\?", "")) { a = '\#REDIRECT \[\[' + a + '\]\]'; editform.wpTextbox1.value=a; editform.wpSummary.value=a; // not more needed? editform.wpWatchthis.checked=false } }; if((c = XEBOrder.getIndex('T1')) != -1) allEditButtons[bu_len+c].width = 6; }; if(!wgIsArticle) // only if edit hookEvent("load", extendButtons);