MediaWiki:Common.js: Porovnání verzí
Bez shrnutí editace |
Bez shrnutí editace |
||
Řádek 4: | Řádek 4: | ||
//importScriptURI('resources/wikEd.js'); | //importScriptURI('resources/wikEd.js'); | ||
$ | $.ajax({ | ||
dataType: 'script', | |||
cache: true, | |||
' | url: 'http://meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/InsertWikiEditorButton.js&action=raw&ctype=text/javascript' | ||
}).done(function () { | |||
// Happy face | |||
krInsertWikiEditorButton({ | |||
id: "mw-customeditbutton-myspecialbutton", | |||
icon: "http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png", | |||
label: 'Insert happy face', | |||
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' | |||
}); | |||
}); |
Verze z 31. 1. 2015, 11:52
/* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky. */ // install [[Wikipedia:User:Cacycle/wikEd]] in-browser text editor //importScriptURI('resources/wikEd.js'); $.ajax({ dataType: 'script', cache: true, url: 'http://meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/InsertWikiEditorButton.js&action=raw&ctype=text/javascript' }).done(function () { // Happy face krInsertWikiEditorButton({ id: "mw-customeditbutton-myspecialbutton", icon: "http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png", label: 'Insert happy face', 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' }); });