User:Micki/extratoolbarbuttons.js: Difference between revisions
Content deleted Content added
mNo edit summary |
Maintenance: mw:RL/MGU - Updated deprecated module name |
||
(28 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
/*<nowiki><pre>*/ |
/*<nowiki><pre>*/ |
||
var customizeToolbar = function () { |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
//EXTRA TOOLBAR BUTTONS |
|||
$j(document).ready( function() { |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Blockquote': { |
|||
'Template': { |
|||
label: 'Navodnici', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/2/2f/Toolbaricon_quote_1.png', |
|||
action: { |
|||
type: 'encapsulate', |
|||
options: { |
|||
pre: "„", |
|||
post: "“" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
'Strikethrough': { |
|||
} |
|||
label: 'Precrtan tekst', |
|||
} ); |
|||
type: 'button', |
|||
} ); |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/45/Gnome-format-text-strikethrough.svg/25px-Gnome-format-text-strikethrough.svg.png', |
|||
} |
|||
action: { |
|||
type: 'encapsulate', |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
options: { |
|||
$j(document).ready( function() { |
|||
pre: "<s>", |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
post: "</s>" |
|||
'section': 'advanced', |
|||
} |
|||
'group': 'format', |
|||
} |
|||
'tools': { |
|||
}, |
|||
'External link': { |
|||
'Template': { |
|||
label: 'Spoljašnja veza', |
|||
label: 'Šablon', |
|||
type: 'button', |
|||
type: 'button', |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/5/53/Button_ext_link.png', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/d/dd/Vector_toolbar_template_button.png', |
|||
action: { |
|||
action: { |
|||
type: 'encapsulate', |
|||
type: 'encapsulate', |
|||
options: { |
|||
options: { |
|||
pre: "[", |
|||
pre: "{{", |
|||
post: "]" |
|||
post: "}}" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
'External link': { |
|||
} ); |
|||
label: 'Spoljašnja veza', |
|||
} ); |
|||
type: 'button', |
|||
} |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/49/Gnome-go-previous.svg/25px-Gnome-go-previous.svg.png', |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
action: { |
|||
$j(document).ready( function() { |
|||
type: 'encapsulate', |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
options: { |
|||
'section': 'advanced', |
|||
pre: "[", |
|||
'group': 'format', |
|||
post: "]" |
|||
'tools': { |
|||
} |
|||
'Internal link': { |
|||
} |
|||
label: 'Unutrašnja veza', |
|||
}, |
|||
type: 'button', |
|||
'Internal link': { |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/9/97/Button_int_link.png', |
|||
label: 'Unutrašnja veza', |
|||
action: { |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/94/Gnome-go-next.svg/25px-Gnome-go-next.svg.png', |
|||
options: { |
|||
action: { |
|||
pre: "[[", |
|||
type: 'encapsulate', |
|||
post: "]]" |
|||
options: { |
|||
} |
|||
pre: "[[", |
|||
} |
|||
post: "]]" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
}, |
|||
} ); |
|||
'Link': { |
|||
} |
|||
label: 'Veza', |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
type: 'button', |
|||
$j(document).ready( function() { |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/27/Gnome-go-last.svg/25px-Gnome-go-last.svg.png', |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
action: { |
|||
'section': 'advanced', |
|||
type: 'encapsulate', |
|||
'group': 'format', |
|||
options: { |
|||
'tools': { |
|||
pre: "[[|", |
|||
'Link': { |
|||
post: "]]" |
|||
label: 'Veza', |
|||
} |
|||
type: 'button', |
|||
} |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/0/0c/Button_Link_DifferentName.png', |
|||
}, |
|||
action: { |
|||
'Vertical line': { |
|||
type: 'encapsulate', |
|||
label: 'Uspravna crta', |
|||
options: { |
|||
type: 'button', |
|||
pre: "[[|", |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/46/Gnome-go-first.svg/25px-Gnome-go-first.svg.png', |
|||
post: "]]" |
|||
action: { |
|||
} |
|||
type: 'encapsulate', |
|||
} |
|||
options: { |
|||
} |
|||
pre: "|" |
|||
} |
|||
} |
|||
} ); |
|||
} |
|||
} ); |
|||
}, |
|||
} |
|||
'Category': { |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
label: 'Kategorija', |
|||
$j(document).ready( function() { |
|||
type: 'button', |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Gnome-go-bottom.svg/25px-Gnome-go-bottom.svg.png', |
|||
'section': 'advanced', |
|||
action: { |
|||
'group': 'format', |
|||
type: 'encapsulate', |
|||
'tools': { |
|||
options: { |
|||
'Vertical line': { |
|||
pre: "[[Category:", |
|||
label: 'Uspravna crta', |
|||
post: "]]" |
|||
type: 'button', |
|||
} |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/7/71/TableCell.png', |
|||
} |
|||
action: { |
|||
}, |
|||
type: 'encapsulate', |
|||
'Advanced image': { |
|||
options: { |
|||
label: 'Slika 250px', |
|||
pre: "|", |
|||
type: 'button', |
|||
post: "" |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Image-x-generic.svg/25px-Image-x-generic.svg.png', |
|||
} |
|||
action: { |
|||
} |
|||
type: 'encapsulate', |
|||
} |
|||
options: { |
|||
} |
|||
pre: "[[File:", |
|||
} ); |
|||
post: "|thumb|right|250px|Opis]]" |
|||
} ); |
|||
} |
|||
} |
|||
} |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
}, |
|||
$j(document).ready( function() { |
|||
'Smile': { |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
label: 'Smeje se', |
|||
'section': 'advanced', |
|||
type: 'button', |
|||
'group': 'format', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-smile.svg/25px-Face-smile.svg.png', |
|||
'tools': { |
|||
action: { |
|||
'Underline': { |
|||
type: 'encapsulate', |
|||
label: 'Podvučen tekst', |
|||
options: { |
|||
type: 'button', |
|||
pre: "[[File:Face-smile.svg|20px]]" |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/f/fd/Button_underline.png', |
|||
} |
|||
action: { |
|||
} |
|||
type: 'encapsulate', |
|||
}, |
|||
options: { |
|||
'Winking': { |
|||
pre: "<u>", |
|||
label: 'Namiguje', |
|||
post: "</u>" |
|||
type: 'button', |
|||
} |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/57/Face-wink.svg/25px-Face-wink.svg.png', |
|||
} |
|||
action: { |
|||
} |
|||
type: 'encapsulate', |
|||
} |
|||
options: { |
|||
} ); |
|||
pre: "[[File:Face-wink.svg|20px]]" |
|||
} ); |
|||
} |
|||
} |
|||
} |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
}, |
|||
$j(document).ready( function() { |
|||
'Done': { |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
label: 'Urađeno', |
|||
'section': 'advanced', |
|||
type: 'button', |
|||
'group': 'format', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0e/Dialog-apply.svg/25px-Dialog-apply.svg.png', |
|||
'tools': { |
|||
action: { |
|||
'Strikethrough': { |
|||
type: 'encapsulate', |
|||
label: 'Precrtan tekst', |
|||
options: { |
|||
type: 'button', |
|||
pre: "{{done}} ", |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/c/c9/Button_strike.png', |
|||
post: " ~~~~" |
|||
action: { |
|||
} |
|||
type: 'encapsulate', |
|||
} |
|||
options: { |
|||
}, |
|||
pre: "<s>", |
|||
'Not done': { |
|||
post: "</s>" |
|||
label: 'Nije urađeno', |
|||
} |
|||
type: 'button', |
|||
} |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/75/Gnome-colors-window-close.svg/25px-Gnome-colors-window-close.svg.png', |
|||
} |
|||
action: { |
|||
} |
|||
type: 'encapsulate', |
|||
} ); |
|||
options: { |
|||
} ); |
|||
pre: "{{not done}} ", |
|||
} |
|||
post: " ~~~~" |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
} |
|||
$j(document).ready( function() { |
|||
} |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
}, |
|||
'section': 'advanced', |
|||
'Signature': { |
|||
'group': 'format', |
|||
label: 'Potpis', |
|||
'tools': { |
|||
type: 'button', |
|||
'Category': { |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/7/79/Insert-signature.png', |
|||
label: 'Kategorija', |
|||
action: { |
|||
type: 'button', |
|||
type: 'encapsulate', |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/b/b6/Button_category_link.png', |
|||
options: { |
|||
action: { |
|||
pre: " ~~~~" |
|||
type: 'encapsulate', |
|||
} |
|||
options: { |
|||
} |
|||
pre: "[[Category:", |
|||
} |
|||
post: "]]" |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
//EMOTICONS |
|||
} |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
} |
|||
'sections': { |
|||
} ); |
|||
'emoticons': { |
|||
} ); |
|||
'type': 'toolbar', |
|||
} |
|||
'label': 'Emoticons' |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
} |
|||
$j(document).ready( function() { |
|||
} |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
}); |
|||
'section': 'advanced', |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'group': 'format', |
|||
'section': 'emoticons', |
|||
'tools': { |
|||
'groups': { |
|||
'Advanced image': { |
|||
'emoticons': { |
|||
label: 'Slika 250px', |
|||
'label': 'Emoticons' |
|||
type: 'button', |
|||
} |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/1/1c/Button_advanced_image.png', |
|||
} |
|||
action: { |
|||
}); |
|||
type: 'encapsulate', |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
options: { |
|||
'section': 'emoticons', |
|||
pre: "[[File:", |
|||
'group': 'emoticons', |
|||
post: "|thumb|rught|250px|Opis]]" |
|||
'tools': { |
|||
} |
|||
'smile': { |
|||
} |
|||
label: 'Smile', |
|||
} |
|||
type: 'button', |
|||
} |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-smile.svg/25px-Face-smile.svg.png', |
|||
} ); |
|||
action: { |
|||
} ); |
|||
type: 'encapsulate', |
|||
} |
|||
options: { |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
pre: "[[File:Face-smile.svg|20px]]" |
|||
$j(document).ready( function() { |
|||
} |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
} |
|||
'section': 'advanced', |
|||
}, |
|||
'group': 'format', |
|||
'frown': { |
|||
'tools': { |
|||
label: 'Frown', |
|||
'Test': { |
|||
type: 'button', |
|||
label: 'Test', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/06/Face-sad.svg/25px-Face-sad.svg.png', |
|||
type: 'button', |
|||
action: { |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/e/e1/Button_problematic.png', |
|||
type: 'encapsulate', |
|||
action: { |
|||
options: { |
|||
type: 'encapsulate', |
|||
pre: "[[File:Face-sad.svg|20px]]" |
|||
options: { |
|||
} |
|||
pre: "{{subst:test}} ~~~~", |
|||
} |
|||
post: "" |
|||
}, |
|||
} |
|||
'plain': { |
|||
} |
|||
label: 'Plain', |
|||
} |
|||
type: 'button', |
|||
} |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Face-plain.svg/25px-Face-plain.svg.png', |
|||
} ); |
|||
action: { |
|||
} ); |
|||
type: 'encapsulate', |
|||
} |
|||
options: { |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
pre: "[[File:Face-plain.svg|20px]]" |
|||
$j(document).ready( function() { |
|||
} |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
} |
|||
'section': 'advanced', |
|||
}, |
|||
'group': 'format', |
|||
'wink': { |
|||
'tools': { |
|||
label: 'Wink', |
|||
'Smile': { |
|||
type: 'button', |
|||
label: 'Smeje se', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/57/Face-wink.svg/25px-Face-wink.svg.png', |
|||
type: 'button', |
|||
action: { |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/f/f5/Button_smiley_face_grin.png', |
|||
type: 'encapsulate', |
|||
action: { |
|||
options: { |
|||
type: 'encapsulate', |
|||
pre: "[[File:Face-wink.svg|20px]]" |
|||
options: { |
|||
} |
|||
pre: "[[File:Face-grin.svg|20px]]", |
|||
} |
|||
post: "" |
|||
}, |
|||
} |
|||
'tongue': { |
|||
} |
|||
label: 'Tongue', |
|||
} |
|||
type: 'button', |
|||
} |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/7e/Face-tongue.svg/25px-Face-tongue.svg.png', |
|||
} ); |
|||
action: { |
|||
} ); |
|||
type: 'encapsulate', |
|||
} |
|||
options: { |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
pre: "[[File:Face-tongue.svg|20px]]" |
|||
$j(document).ready( function() { |
|||
} |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
} |
|||
'section': 'advanced', |
|||
}, |
|||
'group': 'format', |
|||
'surprised': { |
|||
'tools': { |
|||
label: 'Surprised', |
|||
'Winking': { |
|||
type: 'button', |
|||
label: 'Namiguje', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-surprise.svg/25px-Face-surprise.svg.png', |
|||
type: 'button', |
|||
action: { |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png', |
|||
type: 'encapsulate', |
|||
action: { |
|||
options: { |
|||
type: 'encapsulate', |
|||
pre: "[[File:Face-surprise.svg|20px]]" |
|||
options: { |
|||
} |
|||
pre: "[[File:Face-wink.svg|20px]]", |
|||
} |
|||
post: "" |
|||
}, |
|||
} |
|||
'confused': { |
|||
} |
|||
label: 'Confused', |
|||
} |
|||
type: 'button', |
|||
} |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Face-confused.svg/25px-Face-confused.svg.png', |
|||
} ); |
|||
action: { |
|||
} ); |
|||
type: 'encapsulate', |
|||
} |
|||
options: { |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
pre: "[[File:Face-confused.svg|20px]]" |
|||
$j(document).ready( function() { |
|||
} |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
} |
|||
'section': 'advanced', |
|||
}, |
|||
'group': 'format', |
|||
'grin': { |
|||
'tools': { |
|||
label: 'Grin', |
|||
'Unsigned post': { |
|||
type: 'button', |
|||
label: 'Komentar bez potpisa', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Face-grin.svg/25px-Face-grin.svg.png', |
|||
type: 'button', |
|||
action: { |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/3/38/Button_plume.png', |
|||
type: 'encapsulate', |
|||
action: { |
|||
options: { |
|||
type: 'encapsulate', |
|||
pre: "[[File:Face-grin.svg|20px]]" |
|||
options: { |
|||
} |
|||
pre: "{{Unsigned|", |
|||
} |
|||
post: "}}" |
|||
}, |
|||
} |
|||
'braces': { |
|||
} |
|||
label: 'Braces grin', |
|||
} |
|||
type: 'button', |
|||
} |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Face-grin-braces.svg/25px-Face-grin-braces.svg.png', |
|||
} ); |
|||
action: { |
|||
} ); |
|||
type: 'encapsulate', |
|||
} |
|||
options: { |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
pre: "[[File:Face-grin-braces.svg|20px]]" |
|||
$j(document).ready( function() { |
|||
} |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
} |
|||
'section': 'advanced', |
|||
}, |
|||
'group': 'format', |
|||
'crying': { |
|||
'tools': { |
|||
label: 'Crying', |
|||
'Signature': { |
|||
type: 'button', |
|||
label: 'Potpis', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Face-crying.svg/25px-Face-crying.svg.png', |
|||
type: 'button', |
|||
action: { |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/7/79/Insert-signature.png', |
|||
type: 'encapsulate', |
|||
action: { |
|||
options: { |
|||
type: 'encapsulate', |
|||
pre: "[[File:Face-crying.svg|20px]]" |
|||
options: { |
|||
} |
|||
pre: " ~~~~", |
|||
} |
|||
post: "" |
|||
}, |
|||
} |
|||
'blush': { |
|||
} |
|||
label: 'Blush', |
|||
} |
|||
type: 'button', |
|||
} |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Face-blush.svg/25px-Face-blush.svg.png', |
|||
} ); |
|||
action: { |
|||
} ); |
|||
type: 'encapsulate', |
|||
} |
|||
options: { |
|||
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) { |
|||
pre: "[[File:Face-blush.svg|20px]]" |
|||
$j(document).ready( function() { |
|||
} |
|||
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { |
|||
} |
|||
'section': 'advanced', |
|||
}, |
|||
'group': 'format', |
|||
'laughing': { |
|||
'tools': { |
|||
label: 'Laughing', |
|||
'Delete': { |
|||
type: 'button', |
|||
label: 'Speedy deletion', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/15/Face-smile-big.svg/25px-Face-smile-big.svg.png', |
|||
type: 'button', |
|||
action: { |
|||
icon: 'http://upload.wikimedia.org/wikipedia/commons/2/29/Toolbaricon_bold_B.png', |
|||
type: 'encapsulate', |
|||
action: { |
|||
options: { |
|||
type: 'encapsulate', |
|||
pre: "[[File:Face-smile-big.svg|20px]]" |
|||
options: { |
|||
} |
|||
pre: "{{delete|", |
|||
} |
|||
post: "}}" |
|||
}, |
|||
} |
|||
'kiss': { |
|||
} |
|||
label: 'Kiss', |
|||
} |
|||
type: 'button', |
|||
} |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Face-kiss.svg/25px-Face-kiss.svg.png', |
|||
} ); |
|||
action: { |
|||
} ); |
|||
type: 'encapsulate', |
|||
options: { |
|||
pre: "[[File:Face-kiss.svg|20px]]" |
|||
} |
|||
} |
|||
}, |
|||
'glasses': { |
|||
label: 'Glasses', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0f/Face-glasses.svg/25px-Face-glasses.svg.png', |
|||
action: { |
|||
type: 'encapsulate', |
|||
options: { |
|||
pre: "[[File:Face-glasses.svg|20px]]" |
|||
} |
|||
} |
|||
}, |
|||
'nerd': { |
|||
label: 'Nerd', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/03/Face-grin_expert.svg/25px-Face-grin_expert.svg.png', |
|||
action: { |
|||
type: 'encapsulate', |
|||
options: { |
|||
pre: "[[File:Face-grin_expert.svg|20px]]" |
|||
} |
|||
} |
|||
}, |
|||
'angel': { |
|||
label: 'Angel', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Face-angel.svg/25px-Face-angel.svg.png', |
|||
action: { |
|||
type: 'encapsulate', |
|||
options: { |
|||
pre: "[[File:Face-angel.svg|20px]]" |
|||
} |
|||
} |
|||
}, |
|||
'devil': { |
|||
label: 'Devil', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/70/Face-devil-grin.svg/25px-Face-devil-grin.svg.png', |
|||
action: { |
|||
type: 'encapsulate', |
|||
options: { |
|||
pre: "[[File:Face-devil-grin.svg|20px]]" |
|||
} |
|||
} |
|||
}, |
|||
'monkey': { |
|||
label: 'Monkey', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Face-monkey.svg/25px-Face-monkey.svg.png', |
|||
action: { |
|||
type: 'encapsulate', |
|||
options: { |
|||
pre: "[[File:Face-monkey.svg|20px]]" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}); |
|||
//REMOVING THINGS |
|||
$('#wpTextbox1').wikiEditor('removeFromToolbar', { |
|||
'section': 'help' |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('removeFromToolbar', { |
|||
'section': 'main', |
|||
'group': 'insert', |
|||
'tool': 'file' |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('removeFromToolbar', { |
|||
'section': 'main', |
|||
'group': 'insert', |
|||
'tool': 'signature' |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('removeFromToolbar', { |
|||
'section': 'main', |
|||
'group': 'insert', |
|||
'tool': 'signature-ns0' |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('removeFromToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'heading' |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('removeFromToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tool': 'ulist' |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('removeFromToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tool': 'olist' |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('removeFromToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tool': 'indent' |
|||
}); |
|||
}; |
|||
if ($.inArray(mw.config.get('wgAction'), ['edit', 'submit']) !== -1) { |
|||
mw.loader.using('user.options', function () { |
|||
if (mw.user.options.get('usebetatoolbar')) { |
|||
mw.loader.using('ext.wikiEditor', function () { |
|||
$(document).ready(customizeToolbar); |
|||
}); |
|||
} |
|||
}); |
|||
} |
} |
||
/*</nowiki></pre>*/ |
/*</nowiki></pre>*/ |
Latest revision as of 07:51, 20 January 2019
/*<nowiki><pre>*/
var customizeToolbar = function () {
//EXTRA TOOLBAR BUTTONS
$('#wpTextbox1').wikiEditor('addToToolbar', {
'section': 'advanced',
'group': 'format',
'tools': {
'Blockquote': {
label: 'Navodnici',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/2/2f/Toolbaricon_quote_1.png',
action: {
type: 'encapsulate',
options: {
pre: "„",
post: "“"
}
}
},
'Strikethrough': {
label: 'Precrtan tekst',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/45/Gnome-format-text-strikethrough.svg/25px-Gnome-format-text-strikethrough.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "<s>",
post: "</s>"
}
}
},
'Template': {
label: 'Šablon',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/d/dd/Vector_toolbar_template_button.png',
action: {
type: 'encapsulate',
options: {
pre: "{{",
post: "}}"
}
}
},
'External link': {
label: 'Spoljašnja veza',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/49/Gnome-go-previous.svg/25px-Gnome-go-previous.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[",
post: "]"
}
}
},
'Internal link': {
label: 'Unutrašnja veza',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/94/Gnome-go-next.svg/25px-Gnome-go-next.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[",
post: "]]"
}
}
},
'Link': {
label: 'Veza',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/27/Gnome-go-last.svg/25px-Gnome-go-last.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[|",
post: "]]"
}
}
},
'Vertical line': {
label: 'Uspravna crta',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/46/Gnome-go-first.svg/25px-Gnome-go-first.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "|"
}
}
},
'Category': {
label: 'Kategorija',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Gnome-go-bottom.svg/25px-Gnome-go-bottom.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[Category:",
post: "]]"
}
}
},
'Advanced image': {
label: 'Slika 250px',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Image-x-generic.svg/25px-Image-x-generic.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:",
post: "|thumb|right|250px|Opis]]"
}
}
},
'Smile': {
label: 'Smeje se',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-smile.svg/25px-Face-smile.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-smile.svg|20px]]"
}
}
},
'Winking': {
label: 'Namiguje',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/57/Face-wink.svg/25px-Face-wink.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-wink.svg|20px]]"
}
}
},
'Done': {
label: 'Urađeno',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0e/Dialog-apply.svg/25px-Dialog-apply.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "{{done}} ",
post: " ~~~~"
}
}
},
'Not done': {
label: 'Nije urađeno',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/75/Gnome-colors-window-close.svg/25px-Gnome-colors-window-close.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "{{not done}} ",
post: " ~~~~"
}
}
},
'Signature': {
label: 'Potpis',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/7/79/Insert-signature.png',
action: {
type: 'encapsulate',
options: {
pre: " ~~~~"
}
}
}
}
});
//EMOTICONS
$('#wpTextbox1').wikiEditor('addToToolbar', {
'sections': {
'emoticons': {
'type': 'toolbar',
'label': 'Emoticons'
}
}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
'section': 'emoticons',
'groups': {
'emoticons': {
'label': 'Emoticons'
}
}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
'section': 'emoticons',
'group': 'emoticons',
'tools': {
'smile': {
label: 'Smile',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-smile.svg/25px-Face-smile.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-smile.svg|20px]]"
}
}
},
'frown': {
label: 'Frown',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/06/Face-sad.svg/25px-Face-sad.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-sad.svg|20px]]"
}
}
},
'plain': {
label: 'Plain',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Face-plain.svg/25px-Face-plain.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-plain.svg|20px]]"
}
}
},
'wink': {
label: 'Wink',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/57/Face-wink.svg/25px-Face-wink.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-wink.svg|20px]]"
}
}
},
'tongue': {
label: 'Tongue',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/7e/Face-tongue.svg/25px-Face-tongue.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-tongue.svg|20px]]"
}
}
},
'surprised': {
label: 'Surprised',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-surprise.svg/25px-Face-surprise.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-surprise.svg|20px]]"
}
}
},
'confused': {
label: 'Confused',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Face-confused.svg/25px-Face-confused.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-confused.svg|20px]]"
}
}
},
'grin': {
label: 'Grin',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Face-grin.svg/25px-Face-grin.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-grin.svg|20px]]"
}
}
},
'braces': {
label: 'Braces grin',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Face-grin-braces.svg/25px-Face-grin-braces.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-grin-braces.svg|20px]]"
}
}
},
'crying': {
label: 'Crying',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Face-crying.svg/25px-Face-crying.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-crying.svg|20px]]"
}
}
},
'blush': {
label: 'Blush',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Face-blush.svg/25px-Face-blush.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-blush.svg|20px]]"
}
}
},
'laughing': {
label: 'Laughing',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/15/Face-smile-big.svg/25px-Face-smile-big.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-smile-big.svg|20px]]"
}
}
},
'kiss': {
label: 'Kiss',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Face-kiss.svg/25px-Face-kiss.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-kiss.svg|20px]]"
}
}
},
'glasses': {
label: 'Glasses',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0f/Face-glasses.svg/25px-Face-glasses.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-glasses.svg|20px]]"
}
}
},
'nerd': {
label: 'Nerd',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/03/Face-grin_expert.svg/25px-Face-grin_expert.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-grin_expert.svg|20px]]"
}
}
},
'angel': {
label: 'Angel',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Face-angel.svg/25px-Face-angel.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-angel.svg|20px]]"
}
}
},
'devil': {
label: 'Devil',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/70/Face-devil-grin.svg/25px-Face-devil-grin.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-devil-grin.svg|20px]]"
}
}
},
'monkey': {
label: 'Monkey',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Face-monkey.svg/25px-Face-monkey.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-monkey.svg|20px]]"
}
}
}
}
});
//REMOVING THINGS
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'help'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'main',
'group': 'insert',
'tool': 'file'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'main',
'group': 'insert',
'tool': 'signature'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'main',
'group': 'insert',
'tool': 'signature-ns0'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'advanced',
'group': 'heading'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'advanced',
'group': 'format',
'tool': 'ulist'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'advanced',
'group': 'format',
'tool': 'olist'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'advanced',
'group': 'format',
'tool': 'indent'
});
};
if ($.inArray(mw.config.get('wgAction'), ['edit', 'submit']) !== -1) {
mw.loader.using('user.options', function () {
if (mw.user.options.get('usebetatoolbar')) {
mw.loader.using('ext.wikiEditor', function () {
$(document).ready(customizeToolbar);
});
}
});
}
/*</nowiki></pre>*/