Suradnik:Argo Navis/extraeditbuttons.js
Napomena: Nakon objave možda ćete trebati očistiti međuspremnik svog preglednika kako biste vidjeli promjene.
- Firefox / Safari: držite Shift i pritisnite Reload, ili pritisnite bilo Ctrl-F5 ili Ctrl-R (⌘-R na Macu)
- Google Chrome: pritisnite Ctrl-Shift-R (⌘-Shift-R na Macu)
- Internet Explorer / Edge: držite Ctrl i kliknite Refresh, ili pritisnite Ctrl-F5
- Opera: pritisnite Ctrl-F5.
//<pre>
//============================================================
// en: ADD SOME EXTRA BUTTONS TO THE EDITPANEL
//============================================================
function InsertButtonsToToolBar()
{
//Table button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/e/ee/Button_redirect-hr.png",
"speedTip": "Redirect",
"tagOpen": "#REDIRECT [[",
"tagClose": "]]",
"sampleText": ""}
//Table button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/6/60/Button_insert_table.png",
"speedTip": "Table",
"tagOpen": "\n{| border='1' \n|- \n| 1 || 2\n|- \n| 3 || 4",
"tagClose": "\n|}\n",
"sampleText": ""}
//Line break button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/1/13/Button_enter.png",
"speedTip": "Line break",
"tagOpen": "<br />",
"tagClose": "",
"sampleText": ""}
//Small Text
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/5/58/Button_small.png",
"speedTip": "Small",
"tagOpen": "<small>",
"tagClose": "</small>",
"sampleText": "Small Text"}
//Gallery
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/1/12/Button_gallery.png",
"speedTip": "Insert a picture gallery",
"tagOpen": "\n<gallery>\n",
"tagClose": "\n</gallery>",
"sampleText": "Image:FileName.jpg|Caption1\nImage:FileName2.jpg|Caption2"}
//Template button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/3/3b/Button_template_alt.png",
"speedTip": "Template",
"tagOpen": "{{",
"tagClose": "}}",
"sampleText": "Template name"}
//Noinclude
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/c/ce/Button_no_include.png",
"speedTip": "Noinclude",
"tagOpen": "<noinclude>",
"tagClose": "</noinclude>",
"sampleText": ""}
//Includeonly
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/7/79/Button_include.png",
"speedTip": "Includeonly",
"tagOpen": "<includeonly>",
"tagClose": "</includeonly>",
"sampleText": ""}
//Bris
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/1/1c/Button_flamme.png",
"speedTip": "Bris",
"tagOpen": "{{subst:NSBris}}",
"tagClose": "",
"sampleText": ""}
//Wikipedizirati
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/9/9f/WikEd_wikify.png",
"speedTip": "Wikipedizirati",
"tagOpen": "{{Wikipedizirati}}",
"tagClose": "",
"sampleText": ""}
//Wp+
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/b/ba/WikEd_ref.png",
"speedTip": "Wp+",
"tagOpen": "{{Wp+}}",
"tagClose": "",
"sampleText": ""}
//Krive Wp
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/3/3d/Button_tachar.png",
"speedTip": "Krive wp",
"tagOpen": "{{Krive wp}}",
"tagClose": "",
"sampleText": ""}
//Kat?
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/thumb/9/9e/Icono_consulta_borrar.png/23px-Icono_consulta_borrar.png",
"speedTip": "Kategorija???",
"tagOpen": "{{kat?}}<!-- ",
"tagClose": " -->",
"sampleText": ""}
//Razdvojba
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/6/62/Button_desambig.png",
"speedTip": "Razdvojba",
"tagOpen": "{{Razdvojba}}",
"tagClose": "",
"sampleText": ""}
//Dodaj razdvojbu
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/2/22/Button_radio_activite.png",
"speedTip": "Newdsm",
"tagOpen": "{{newdsm}}",
"tagClose": "",
"sampleText": ""}
//Sadržaj
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/thumb/9/90/Broom_icon.png/22px-Broom_icon.png",
"speedTip": "{ {Sadržaj} }",
"tagOpen": "{{subst:NSBris}}",
"tagClose": "",
"sampleText": ""}
//slika za brisanje
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/thumb/f/fc/File_deletion_icon.png/22px-File_deletion_icon.png",
"speedTip": "{ {Slika za brisanje} }",
"tagOpen": "{{subst:SBris}}",
"tagClose": "",
"sampleText": ""}
//GLAVNIRASPORED
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/thumb/e/e6/Evolution-tasks.png/22px-Evolution-tasks.png",
"speedTip": "{ {GLAVNIRASPORED} }",
"tagOpen": "{{GLAVNIRASPORED:",
"tagClose": "}}",
"sampleText": ""}
//Ref dodaj
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/c/c4/Button_ref.png",
"speedTip": "Ref-name",
"tagOpen": "<ref name=\"",
"tagClose": "\"></ref>",
"sampleText": ""}
//Ref druga
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/c/c4/Button_ref.png",
"speedTip": "Ref-dupla",
"tagOpen": "<ref name=\"",
"tagClose": "\" />",
"sampleText": ""}
//Ref podnaslov
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/8/8a/Ref-button-bg.png",
"speedTip": "Izvori {{Izvori}}",
"tagOpen": "== Izvori ==\n{{Izvori}}\n",
"tagClose": "",
"sampleText": ""}
//Vanjske poveznice
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/thumb/4/44/RomanV-01.png/20px-RomanV-01.png",
"speedTip": "== Vanjske poveznice ==",
"tagOpen": "\n== Vanjske poveznice ==",
"tagClose": "",
"sampleText": ""}
//WProjekti
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/thumb/4/4a/Commons-logo.svg/22px-Commons-logo.svg.png",
"speedTip": "WProjekti",
"tagOpen": "\n{{WProjekti \n|commons= \n|commonshr= \n|commonscat= \n|commonscathr= \n|wikivrste= \n|wikivrstehr=",
"tagClose": "\n}}\n",
"sampleText": ""}
//Slika 250px
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/3/3c/Icons-mini-image_new.gif",
"speedTip": "Slika",
"tagOpen": "[[Slika:|thumb|right|250px|]]",
"tagClose": "",
"sampleText": ""}
//Sič
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/thumb/5/52/Nuvola_apps_edu_miscellaneous.png/22px-Nuvola_apps_edu_miscellaneous.png",
"speedTip": "Sič",
"tagOpen": "{{subst:sič}} --~~~~",
"tagClose": "",
"sampleText": ""}
}
$( InsertButtonsToToolBar );
//</pre>