Корисник:Wlodzimierz/extraeditbuttons.js
Напомена: Пошто објавите измене, можда ћете морати да обришете кеш прегледача како бисте их видели.
- Firefox / Safari: Држите Shift и кликните на Reload или притисните Ctrl-F5 или Ctrl-R (⌘-R на Mac-у).
- Google Chrome: Притисните Ctrl-Shift-R (⌘-Shift-R на Mac-у).
- Internet Explorer / Edge: Држите Ctrl и кликните на Refresh или притисните Ctrl-F5.
//<pre>
//============================================================
// en: ADD SOME EXTRA BUTTONS TO THE EDITPANEL
//============================================================
function InsertButtonsToToolBar()
{
//Звјездица
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/b1/Btn_toolbar_liste.png",
"speedTip": "Zvjezdica",
"tagOpen": "*",
"tagClose": "",
"sampleText": ""}
//Крст
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/b1/Button_dagger.png",
"speedTip": "Krst",
"tagOpen": "†",
"tagClose": "",
"sampleText": ""}
//Текст лијево
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/e/ea/Button_align_left.png",
"speedTip": "Tekst lijevo",
"tagOpen": "<div style='text-align: left; direction: ltr; margin-left: 1em;'>\n",
"tagClose": "\n</div>",
"sampleText": "text"}
//Текст центрирано
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/5/5f/Button_center.png",
"speedTip": "Tekst centrirano",
"tagOpen": "<div style='text-align: center;'>\n",
"tagClose": "\n</div>",
"sampleText": "text"}
//Табела
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/6/60/Button_insert_table.png",
"speedTip": "Tabela",
"tagOpen": "\n{| border='1' \n|- \n| 1 || 2\n|- \n| 3 || 4",
"tagClose": "\n|}\n",
"sampleText": ""}
//Нови ред
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.png",
"speedTip": "Novi red",
"tagOpen": "<br />",
"tagClose": "",
"sampleText": ""}
//Мали текст
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/5/58/Button_small.png",
"speedTip": "Mali tekst",
"tagOpen": "<small>",
"tagClose": "</small>",
"sampleText": "text"}
//Галерија
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/1/12/Button_gallery.png",
"speedTip": "Galerija",
"tagOpen": "\n<gallery>\n",
"tagClose": "\n</gallery>",
"sampleText": "Слика:FileName.jpg|Текст 1\nСлика:FileName2.jpg|Текст 2"}
//Обојен текст
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/1/1e/Button_font_color.png",
"speedTip": "Obojen tekst",
"tagOpen": "<span style='color: ColorName'>",
"tagClose": "</span>",
"sampleText": "text"}
//Шаблон
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3b/Button_template_alt.png",
"speedTip": "Šablon",
"tagOpen": "{{",
"tagClose": "}}",
"sampleText": "šablon"}
//Категорија
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/5a/Button_category_alt.png",
"speedTip": "Kategorija",
"tagOpen": "[[Категорија:",
"tagClose": "]]",
"sampleText": "Категорија"}
//За
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/c0/Button_support_vote.png",
"speedTip": "За",
"tagOpen": "{{За}}",
"tagClose": "",
"sampleText": ""}
//Против
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/fc/Button_supp.png",
"speedTip": "Против",
"tagOpen": "{{Против}}",
"tagClose": "",
"sampleText": ""}
//Референца
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png",
"speedTip": "Referenca",
"tagOpen": "<ref>",
"tagClose": "</ref>",
"sampleText": "Referencirani materijal"}
//Референце
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/a0/Button_references_alt.png",
"speedTip": "Reference",
"tagOpen": "<references/>",
"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": ""}
}
$( InsertButtonsToToolBar );
//</pre>