Jump to content

User:Саша Стефановић/extraeditbuttons.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//<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/en/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/en/e/e9/Button_headline2.png",
    "speedTip": "Secondary headline",
    "tagOpen": "\n===",
    "tagClose": "===",
    "sampleText": "Secondary headline"}
//Block Quote
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/en/f/fd/Button_blockquote.png",
    "speedTip": "Insert block of quoted text",
    "tagOpen": "<blockquote style='border: 1px solid blue; padding: 2em;'>\n",
    "tagClose": "\n</blockquote>",
    "sampleText": "Block quote"}
//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"}
//Yes
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/c0/Button_support_vote.png",
    "speedTip": "За",
    "tagOpen": "{{За}}",
    "tagClose": "",
    "sampleText": ""}
//No
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/9/9c/Button_smiley2.png",
    "speedTip": "Smajli",
    "tagOpen": "[[Слика:Face-grin.svg|20п]]",
    "tagClose": "",
    "sampleText": ""}
//:(
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/b0/Button_blocage.png",
    "speedTip": "Smajli",
    "tagOpen": "[[Слика:Sad.png|16п]]",
    "tagClose": "",
    "sampleText": ""}
//:P
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
    "speedTip": "Smajli",
    "tagOpen": "[[Слика:Face-wink.svg|20п]]",
    "tagClose": "",
    "sampleText": ""}
//DEFAULTSORTKEY
mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/b6/Vjazyce-button.png",
    "speedTip": "defsort",
    "tagOpen": "{{DEFAULTSORT:",
    "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": "<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": ""}
//Шаблон болест
mwCustomEditButtons[mwCustomEditButtons.length]  = {       
    "imageFile":   "http://upload.wikimedia.org/wikipedia/commons/e/e3/Button_bienvenido.png",   
    "speedTip": "Шаблон болест",     
    "tagOpen": "{{Болест| назив = | латински = Leptospirosis| слика = Leptospira scanning micrograph.jpg| текст уз слику = Бактерија leptospira под електронским микроскопом| ICD10 = {{ICD10|A|27| |a|20}}| ICD9 = {{ICD9|100}}",         
    "tagClose": "}}",      
    "sampleText": ""}
//Затварање гласања
mwCustomEditButtons[mwCustomEditButtons.length]  = {       
    "imageFile":   "http://upload.wikimedia.org/wikipedia/commons/e/e3/Button_bienvenido.png",   
    "speedTip": "Затварање гласања",     
    "tagOpen": "{{Гласање-крај|за = 3|уздржаних = 0|против = 4|слободно_поље = Чланак остаје.",         
    "tagClose": "}}",      
    "sampleText": ""}
}
$( InsertButtonsToToolBar );
//</pre>