MediaWiki:Group-user.js — различия между версиями
Материал из Энциклопедия фонда «Хайазг»
Oshlikov (обсуждение | вклад) |
Oshlikov (обсуждение | вклад) |
||
Строка 13: | Строка 13: | ||
jQuery('<li id="t-commonUpload"><a href="http://commons.hayazg.info/Special:Upload">Загрузить на склад</a></li>').insertAfter("li#t-upload"); | jQuery('<li id="t-commonUpload"><a href="http://commons.hayazg.info/Special:Upload">Загрузить на склад</a></li>').insertAfter("li#t-upload"); | ||
jQuery('<input type="submit" value="Загрузить файл" name="wpUpload" title="Начать загрузку [s]" accesskey="s" class="mw-htmlform-submit" />').insertAfter("table#mw-htmlform-source"); | jQuery('<input type="submit" value="Загрузить файл" name="wpUpload" title="Начать загрузку [s]" accesskey="s" class="mw-htmlform-submit" />').insertAfter("table#mw-htmlform-source"); | ||
+ | |||
+ | $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | ||
+ | 'specialchars': { | ||
+ | 'labelMsg': 'wikieditor-toolbar-hayazg-specialchars', | ||
+ | 'layout': 'characters', | ||
+ | 'characters': [ | ||
+ | "I", "II", "III", "IV", | ||
+ | { 'label': "\u00ab\u00bb", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u00ab", 'post': "\u00bb" } } }, | ||
+ | { 'label': "\u2018\u2019", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u2018", 'post': "\u2019" } } }, | ||
+ | { 'label': "\u201e\u201c", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u201e", 'post': "\u201c" } } }, | ||
+ | "~", "#", "@", "\u00a7", "$", "\u00a2", "\u00a9", "\u00ae" ,"\u2122", "|", | ||
+ | { | ||
+ | 'label': "[[ссылка|текст]]", | ||
+ | 'action': { | ||
+ | 'type': 'encapsulate', 'options': { 'pre': "[["+"|", 'post': "]]" } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | 'label': "[[/доп.ссылка|текст]]", | ||
+ | 'action': { | ||
+ | 'type': 'encapsulate', 'options': { 'pre': "[[/"+"|", 'post': "]]" } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | 'label': "Цитата", | ||
+ | 'action': { | ||
+ | 'type': 'encapsulate', 'options': { 'pre': "{{Цитата|", 'post': "}}" } | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | } ); | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
}); | }); |
Версия 11:23, 1 февраля 2017
/* Здесь любой JavaScript будет загружаться только для зарегистрированных пользователей */
jQuery(document).ready(
function() {
jQuery('<div id="p-draft" class="portal"> \
<h5>Черновик</h5><div class="body"><ul> \
<li><a href="/Draft/Заглавная_страница">Главная</a></li> \
<li><a href="/Категория:Draft/Персоналии">Персоны</a> \
<li><a href="/Категория:Draft/Организации_импортированные">Импортиров орг.</a></li> \
<li><a href="/Категория:Draft/Подвал">Подвал</a></li> \
</ul>').insertBefore("div#p-tb");
jQuery('<li id="t-commonUpload"><a href="http://commons.hayazg.info/Special:Upload">Загрузить на склад</a></li>').insertAfter("li#t-upload");
jQuery('<input type="submit" value="Загрузить файл" name="wpUpload" title="Начать загрузку [s]" accesskey="s" class="mw-htmlform-submit" />').insertAfter("table#mw-htmlform-source");
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'specialchars': {
'labelMsg': 'wikieditor-toolbar-hayazg-specialchars',
'layout': 'characters',
'characters': [
"I", "II", "III", "IV",
{ 'label': "\u00ab\u00bb", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u00ab", 'post': "\u00bb" } } },
{ 'label': "\u2018\u2019", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u2018", 'post': "\u2019" } } },
{ 'label': "\u201e\u201c", 'action': { 'type': 'encapsulate', 'options': { 'pre': "\u201e", 'post': "\u201c" } } },
"~", "#", "@", "\u00a7", "$", "\u00a2", "\u00a9", "\u00ae" ,"\u2122", "|",
{
'label': "[[ссылка|текст]]",
'action': {
'type': 'encapsulate', 'options': { 'pre': "[["+"|", 'post': "]]" }
}
},
{
'label': "[[/доп.ссылка|текст]]",
'action': {
'type': 'encapsulate', 'options': { 'pre': "[[/"+"|", 'post': "]]" }
}
},
{
'label': "Цитата",
'action': {
'type': 'encapsulate', 'options': { 'pre': "{{Цитата|", 'post': "}}" }
}
}
]
}
} );
});