Suradnica:MayaSimFan/extraeditbuttons.js

Izvor: Wikipedija
Jump to navigation Jump to search

Napomena: nakon snimanja, trebate očistiti memoriju svog internetskog preglednika kako biste odmah vidjeli promjene: Mozilla: kliknite reload (ili ctrl-r), IE / Opera: ctrl-f5, Safari: cmd-r, Konqueror ctrl-r.

//<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"}
//Yes
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/ba/Button_conserver.png",
    "speedTip": "Za",
    "tagOpen": "{{Za}}",
    "tagClose": "",
    "sampleText": ""}
//No
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/fc/Button_supp.png",
    "speedTip": "Protiv",
    "tagOpen": "{{Protiv}}",
    "tagClose": "",
    "sampleText": ""}
//Komentar
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/2e/Button_pict_comment.png",
    "speedTip": "Komentar",
    "tagOpen": "{{Komentar}}",
    "tagClose": "",
    "sampleText": ""}
//:)
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/1c/Button_smiley_face_smile.png",
    "speedTip": "Smajli",
    "tagOpen": "[[Slika:Face-smile.svg|20px]]",
    "tagClose": "",
    "sampleText": ""}
//:D
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/f5/Button_smiley_face_grin.png",
    "speedTip": "Smajli",
    "tagOpen": "[[Slika:Face-grin.svg|20px]]",
    "tagClose": "",
    "sampleText": ""}
//:(
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/b0/Button_blocage.png",
    "speedTip": "Smajli",
    "tagOpen": "[[Slika:Face-sad.svg|20px]]",
    "tagClose": "",
    "sampleText": ""}
//;)
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
    "speedTip": "Smajli",
    "tagOpen": "[[Slika:Face-wink.svg|20px]]",
    "tagClose": "",
    "sampleText": ""}
//Reference link button
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png",
    "speedTip": "<ref>",
    "tagOpen": "<ref>",
    "tagClose": "</ref>",
    "sampleText": "Insert reference material"}
//Reference button
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/a0/Button_references_alt.png",
    "speedTip": "Reference footer",
    "tagOpen": "{{reflist|2}}",
    "tagClose": "",
    "sampleText": ""}
//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": ""}
//Tochka
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/aa/Button_dot1.PNG",
    "speedTip": "Dot",
    "tagOpen": "•",
    "tagClose": "",
    "sampleText": ""}
//Crta
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/71/TableCell.png",
    "speedTip": "Crta",
    "tagOpen": "&#124;",
    "tagClose": "",
    "sampleText": ""}
//WProjekti
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/12/Button_find.png",
    "speedTip": "WProjekti",
    "tagOpen": "{{ WProjekti \n|commons        = \n|commonshr      = \n|commonscat     = \n|commonscathr   = \n|wikivrste      = \n|wikivrstehr    = \n|wikizvor       = \n|wikizvor_autor = \n|wječnik        = \n|wikiknjige     = \n|wikicitat      = \n}}",
    "tagClose": "",
    "sampleText": ""}
//Premjestiti na Commons
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/6c/Button_commons.png",
    "speedTip": "Premjestiti na Commons",
    "tagOpen": "{{Premjestiti na Commons‎}}",
    "tagClose": "",
    "sampleText": ""}
//Slika za brisanje
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_bombe.png",
    "speedTip": "Slika za brisanje",
    "tagOpen": "{{subst:SBris}}",
    "tagClose": "",
    "sampleText": ""}
//Sredi slike
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/22/Button_radio_activite.png",
    "speedTip": "Srediti slike",
    "tagOpen": "{{ Srediti slike \n|slika1 = \n|slika2 = \n|slika3 = \n|slika4 = \n|slika5 = \n|slika6 = \n|slika7 = \n|slika8 = \n|slika9 = \n|datum = {{subst:#time: d. xg Y.|+1hours+14days}} \n|potpis = --~~~~ \n}}",
    "tagClose": "",
    "sampleText": ""}
//Sadržaj
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/45/Memo_button.png",
    "speedTip": "Neodgovarajući sadržaj",
    "tagOpen": "{{subst:NSBris}}",
    "tagClose": "",
    "sampleText": ""}
//Bris	 
mwCustomEditButtons[mwCustomEditButtons.length] = {	 
	"imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/66/Button_mort.png",	 
	"speedTip": "Bris",	 
	"tagOpen": "{{bris|}}",	 
	"tagClose": "",	 
	"sampleText": ""}
//IČ arhiv početak	
mwCustomEditButtons[mwCustomEditButtons.length] = {	
        "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/32/BTA-1.png",	
        "speedTip": "IČ",
        "tagOpen": "{{ArhivPočetak}}",
        "tagClose": "",	
        "sampleText": ""}
//IČ arhiv kraj
mwCustomEditButtons[mwCustomEditButtons.length] = {
        "imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/5b/BTA-2.png",
        "speedTip": "IČ",	
        "tagOpen": "{{ArhivKraj}}",
        "tagClose": "",
        "sampleText": ""}
}
addOnloadHook( InsertButtonsToToolBar );
//</pre>