User:Саша Стефановић/extraeditbuttons.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
Documentation for this user script can be added at User:Саша Стефановић/extraeditbuttons. |
//<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>