Přeskočit na obsah

MediaWiki:Common.js: Porovnání verzí

Přidáno 451 bajtů ,  31. 1. 2015
bez shrnutí editace
Bez shrnutí editace
Bez shrnutí editace
Řádek 4: Řádek 4:
//importScriptURI('resources/wikEd.js');
//importScriptURI('resources/wikEd.js');


$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
$.ajax({
'section': 'emoticons',
dataType: 'script',
'group': 'faces',
cache: true,
'tools': {
url: 'http://meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/InsertWikiEditorButton.js&action=raw&ctype=text/javascript'
'smile': {
}).done(function () {
label: 'Smile!', // or use labelMsg for a localized label, see above
type: 'button',
// Happy face
icon: 'http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png',
krInsertWikiEditorButton({
action: {
id: "mw-customeditbutton-myspecialbutton",
type: 'encapsulate',
icon: "http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png",
options: {
label: 'Insert happy face',
pre: ":)" // text to be inserted
insertBefore: '[[File:Gnome-face-smile.svg|21px|',
}
insertAfter: ']]',
}
sampleText: 'Happy face'
}
});
}
} );
// Monkey
krInsertWikiEditorButton({
id: 'mw-customeditbutton-anotherspecialbutton',
icon: 'http://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Gnome-face-monkey.svg/22px-Gnome-face-monkey.svg.png',
label: 'Insert monkey',
insertBefore: '[[File:Gnome-face-monkey.svg|21px|',
insertAfter: ']]',
sampleText: 'Happy face'
});
});