MediaWiki:Editpage.js: verschil tussen versies

Uit Wiki
Naar navigatie springenNaar zoeken springen
Regel 35: Regel 35:
  
 
addInsertButton('wiki/commons/Button_redirect.png','Redirect','#Redirect [[',']]',''); //+ buttons
 
addInsertButton('wiki/commons/Button_redirect.png','Redirect','#Redirect [[',']]',''); //+ buttons
addInsertButton('wikisource/ru/a/a9/Button-dash.png',' — ','—','','');  
+
addInsertButton('wiki/skins/common/images/link-up.gif',' — ','—','','');  
 
addInsertButton('wikipedia/commons/1/11/Button_category.png','Category','[[Category:',']]','');
 
addInsertButton('wikipedia/commons/1/11/Button_category.png','Category','[[Category:',']]','');
  
 
//</nowiki>
 
//</nowiki>

Versie van 5 jun 2008 14:26

//<nowiki>
//dynamically load Commons-style Edittools
function createEdittoolsLink(){
 //get div.mw-editTools
 var box = document.getElementById('wpTextbox1')
 while (box && box.className!='mw-editTools') box=box.nextSibling
 if (!box) return
 //create a link
 var lnk = document.createElement('a')
 lnk.href =  'javascript:loadCommonsTools()'
 lnk.title = 'Load Commons-style Edittools' 
 lnk.id = 'loadCommonsEdittoos'
 lnk.appendChild(document.createTextNode('[load edittools]'))
 lnk.style.cssText = 'float:right'
 box.appendChild(lnk)
}
function loadCommonsTools(){
 importScript('MediaWiki:Scripts/Edittools1.js')
 var lnk = document.getElementById('loadCommonsEdittoos')
 if (lnk) lnk.parentNode.removeChild(lnk)
}
if (doneOnloadHook) createEdittoolsLink()
else addOnloadHook(createEdittoolsLink)


//Add Insert Buttons
function addInsertButton(img, speedTip, tagOpen, tagClose, sampleText){
 mwCustomEditButtons[mwCustomEditButtons.length] =
 {'imageFile': 'http://upload.wikimedia.org/' + img,
  'speedTip': speedTip,
  'tagOpen': tagOpen,
  'tagClose': tagClose,
  'sampleText': sampleText};
}

addInsertButton('wiki/commons/Button_redirect.png','Redirect','#Redirect [[',']]',''); //+ buttons
addInsertButton('wiki/skins/common/images/link-up.gif',' — ','—','',''); 
addInsertButton('wikipedia/commons/1/11/Button_category.png','Category','[[Category:',']]','');

//</nowiki>