Jump to content

User:Minesweeper.007/extraeditbuttons.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Minesweeper.007 (talk | contribs) at 00:38, 24 April 2007 (FIX). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//<pre>

//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='/media/wikipedia/commons/';

// English Wikipedia creates 11 extra buttons which are stored in mwCustomEditButtons
//  rather than mwEditButtons. However, there is no guarantee it will always be 11
//  so we count them here. 
var enExtraButtons=mwCustomEditButtons.length;

var BDict={
'A':['f/f0/Bouton_Vandale0.png','Reverted edit','{{subst:revert|','}} ~~~~','Insert article here'],
'B':['1/1d/Bouton_Vandale1.png','Vandal 1','{{subst:uw-vandal1|','}} ~~~~','Insert article here'],
'C':['c/cc/Bouton_Vandale2.png','Vandal 2','{{subst:uw-vandal2|','}} ~~~~','Insert article here'],
'D':['e/e4/Bouton_Vandale3.png','Vandal 3','{{subst:uw-vandal3|','}} ~~~~','Insert article here'],
'E':['7/7e/Bouton_Vandale4.png','Vandal 4','{{subst:uw-vandal4|','}} ~~~~','Insert article here'],
};

var XEBOrder2=[];
if (typeof XEBOrder!='string') // can be modified
	XEBOrder2="A,B,C,D,E".split(",");
else if (XEBOrder.toLowerCase()=='all') 
	for (b in BDict) XEBOrder2.push(b);
else XEBOrder2=XEBOrder.toUpperCase().split(",");


//</pre>