Uživatel:Abdull/monobook.js
Z Herbert's dune
Poznámka: Po zveřejnění musíte vyprázdnit cache vašeho prohlížeče, jinak změny neuvidíte.
- Firefox / Safari: Při kliknutí na Aktualizovat držte Shift nebo stiskněte Ctrl-F5 nebo Ctrl-R (na Macu ⌘-R)
- Google Chrome: Stiskněte Ctrl-Shift-R (na Macu ⌘-Shift-R)
- Internet Explorer / Edge: Při kliknutí na Aktualizovat držte Ctrl nebo stiskněte Ctrl-F5
- Opera: Stiskněte Ctrl-F5.
// This is based on the original code on Wikipedia:Tools/Editing tools // // The original code was on the project page and needed to be cut and paste to the user's // monobook.js page. However, this caused problems with the quote marks. So I have moved // it to its own page. // // I do not know a lot about Javascript so please do not ask for a complicated change // // See the [[User:MarkS/Extra edit buttons]] for changes log function InsertButtonsToToolBar() { //Strike-Out Button mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png", "speedTip": "Škrtni", "tagOpen": "<s>", "tagClose": "</s>", "sampleText": ""} //Left-Text Button mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/e/ea/Button_align_left.png", "speedTip": "Vľavo", "tagOpen": "<div style='text-align: left; direction: ltr; margin-left: 1em;'>\n", "tagClose": "\n</div>", "sampleText": ""} //Center-Text Button mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/5/5f/Button_center.png", "speedTip": "Na stred", "tagOpen": "<div style='text-align: center;'>\n", "tagClose": "\n</div>", "sampleText": ""} //Table button mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/6/60/Button_insert_table.png", "speedTip": "Tabuľka", "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": "Nový riadok", "tagOpen": "<br />", "tagClose": "", "sampleText": ""} //Superscript mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/8/80/Button_upper_letter.png", "speedTip": "Horný index", "tagOpen": "<sup>", "tagClose": "</sup>", "sampleText": ""} //Subscript mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/7/70/Button_lower_letter.png", "speedTip": "Dolný index", "tagOpen": "<sub>", "tagClose": "</sub>", "sampleText": ""} //Small Text mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/5/58/Button_small.png", "speedTip": "Malé", "tagOpen": "<small>", "tagClose": "</small>", "sampleText": ""} //Comment mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/3/34/Button_hide_comment.png", "speedTip": "Komentár", "tagOpen": "<!-- ", "tagClose": " -->", "sampleText": ""} //Gallery mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/1/12/Button_gallery.png", "speedTip": "Galéria", "tagOpen": "\n<gallery>\n", "tagClose": "\n</gallery>", "sampleText": "Obrázok:FileName.jpg|Caption1\\Obrázok:FileName2.jpg|Caption2"} //Block Quote mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/f/fd/Button_blockquote.png", "speedTip": "Do chlievika", "tagOpen": "<blockquote style='border: 1px solid blue; padding: 1em;'>\n", "tagClose": "\n</blockquote>", "sampleText": ""} //Colour mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/1/1e/Button_font_color.png", "speedTip": "Farba písma", "tagOpen": "<span style='color: ColorName'>", "tagClose": "</span>", "sampleText": ""} //Category button mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/5a/Button_category_alt.png", "speedTip": "Kategória", "tagOpen": "[[Kategória:", "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": ""} //Reference button mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/a0/Button_references_alt.png", "speedTip": "Zobraz referencie", "tagOpen": "<references/>", "tagClose": "", "sampleText": ""} } addOnloadHook( InsertButtonsToToolBar );