Suradnik:Duh Svemira/extraeditbuttons.js
Izgled
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://upload.wikimedia.org/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://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.png",
"speedTip": "Line break",
"tagOpen": "<br />",
"tagClose": "",
"sampleText": ""}
//Small Text
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/58/Button_small.png",
"speedTip": "Small",
"tagOpen": "<small>",
"tagClose": "</small>",
"sampleText": "Small Text"}
//Gallery
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/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"}
//Secondary Headline
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/e9/Button_headline2.png",
"speedTip": "Secondary headline",
"tagOpen": "\n===",
"tagClose": "===",
"sampleText": "Secondary headline"}
//Template button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3b/Button_template_alt.png",
"speedTip": "Template",
"tagOpen": "{{",
"tagClose": "}}",
"sampleText": "Template name"}
//Noinclude
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/ce/Button_no_include.png",
"speedTip": "Noinclude",
"tagOpen": "<noinclude>",
"tagClose": "</noinclude>",
"sampleText": ""}
//Includeonly
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_include.png",
"speedTip": "Includeonly",
"tagOpen": "<includeonly>",
"tagClose": "</includeonly>",
"sampleText": ""}
//Bris
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/1c/Button_flamme.png",
"speedTip": "Bris",
"tagOpen": "{{bris}}",
"tagClose": "",
"sampleText": ""}
//Wikipedizirati
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/9f/WikEd_wikify.png",
"speedTip": "Wikipedizirati",
"tagOpen": "{{Wikipedizirati}}",
"tagClose": "",
"sampleText": ""}
//Wp+
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/ba/WikEd_ref.png",
"speedTip": "Wp+",
"tagOpen": "{{Wp+}}",
"tagClose": "",
"sampleText": ""}
//Krive Wp
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3d/Button_tachar.png",
"speedTip": "Krive wp",
"tagOpen": "{{Krive wp}}",
"tagClose": "",
"sampleText": ""}
//Kat?
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/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://upload.wikimedia.org/wikipedia/commons/6/62/Button_desambig.png",
"speedTip": "Razdvojba",
"tagOpen": "{{Razdvojba}}",
"tagClose": "",
"sampleText": ""}
//Sadržaj
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/Broom_icon.png/22px-Broom_icon.png",
"speedTip": "{ {Sadržaj} }",
"tagOpen": "{{sadržaj|datum=. rujna}}",
"tagClose": "",
"sampleText": ""}
//slika za brisanje
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/thumb/6/66/Rapid_delete.png/22px-Rapid_delete.png",
"speedTip": "{ {Slika za brisanje} }",
"tagOpen": "{{slika za brisanje|datum=. rujna}}",
"tagClose": "",
"sampleText": ""}
//copyright?
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/72/Button_copy_vio_plagio.png",
"speedTip": "{ {copyright?} }",
"tagOpen": "{{copyright?|http://|datum=. rujna}}",
"tagClose": "",
"sampleText": ""}
//DEFAULTSORT
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Evolution-tasks3.png/22px-Evolution-tasks3.png",
"speedTip": "{ {DEFAULTSORT} }",
"tagOpen": "{{DEFAULTSORT|}}",
"tagClose": "",
"sampleText": ""}
//Slika 250px
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3c/Icons-mini-image_new.gif",
"speedTip": "Slika",
"tagOpen": "[[Slika:|thumb|right|250px|]]",
"tagClose": "",
"sampleText": ""}
}
$( InsertButtonsToToolBar );
//</pre>