User:Root/vector.js: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 70: | Line 70: | ||
}), | }), | ||
}).insertBefore($('#pt-mytalk')); | }).insertBefore($('#pt-mytalk')); | ||
/** | |||
* Extra buttons in toolbar | |||
* @stats [[File:Krinkle_InsertWikiEditorButton.js]] | |||
*/ | |||
$.ajax({ | |||
url: '//localhost:8001/index.php?title=MediaWiki:InsertWikiEditorButton.js&action=raw&ctype=text/javascript', | |||
dataType: 'script', | |||
cache: true | |||
}).done(function () { | |||
// Happy face | |||
krInsertWikiEditorButton({ | |||
id: "mw-text-blue", | |||
icon: "/images/BoutonsDefaut03.png", | |||
label: 'make-text-blue', | |||
insertBefore: '<font color="blue">', | |||
insertAfter: '</font>', | |||
sampleText: 'past your text' | |||
}); | |||
// RED | |||
krInsertWikiEditorButton({ | |||
id: 'mw-text-red', | |||
icon: '/images/redtext.png', | |||
label: 'make-text-red', | |||
insertBefore: '<font color="#de0000">', | |||
insertAfter: '</font>', | |||
sampleText: 'past your text' | |||
}); | |||
// DISPLAY TITLE | |||
krInsertWikiEditorButton({ | |||
id: 'mw-display-title', | |||
icon: '/images/BoutonsDefaut03.png', | |||
label: 'DISPLAY TITLE', | |||
insertBefore: "{{DISPLAYTITLE:", | |||
insertAfter: "}}", | |||
sampleText: 'past your text' | |||
}); | |||
}); | |||
Revision as of 08:35, 11 August 2017
// mw.loader.load( '//localhost:8001/index.php?title=MediaWiki:Highlight.js&action=raw&ctype=text/javascript' );
/* $('<li>', {
id: 'pt-название-на-латинице',
html: $('<a>', {
href: 'URL ссылки',
text: 'Видимое название',
title: 'Текст всплывающей подсказки',
}),
}).insertBefore($('#расположение'));
Замените расположение на значение из списка ниже (сохранив знак #). Кнопка будет расположена перед:
pt-userpage — ЛС
pt-mytalk — ЛСО
pt-preferences — Настройки
pt-watchlist — СН
pt-mycontris — Вклад
*/
/* $('<li>', {
id: 'pt-название-на-латинице',
html: $('<a>', {
href: 'URL ссылки',
text: 'Видимое название',
title: 'Текст всплывающей подсказки',
}),
}).insertBefore($('#расположение'));
Замените расположение на значение из списка ниже (сохранив знак #). Кнопка будет расположена перед:
pt-userpage — ЛС
pt-mytalk — ЛСО
pt-preferences — Настройки
pt-watchlist — СН
pt-mycontris — Вклад
*/
$('<li>', {
id: 'pt-css',
html: $('<a>', {
href: 'http://localhost:8001/index.php?title=MediaWiki:Common.css&action=edit',
text: 'css',
title: 'edit Common.css',
}),
}).insertBefore($('#pt-mytalk'));
$('<li>', {
id: 'pt-pcss',
html: $('<a>', {
href: 'http://localhost:8001/index.php?title=MediaWiki:Print.css&action=edit',
text: 'pcss',
title: 'edit Print.css',
}),
}).insertBefore($('#pt-mytalk'));
$('<li>', {
id: 'pt-js',
html: $('<a>', {
href: 'http://localhost:8001/index.php?title=MediaWiki:Common.js&action=edit',
text: 'js',
title: 'edit Common.js',
}),
}).insertBefore($('#pt-mytalk'));
$('<li>', {
id: 'pt-rvjs',
html: $('<a>', {
href: 'http://localhost:8001/index.php?title=User:Root/vector.js&action=edit',
text: 'rvjs',
title: 'edit Root vector.js',
}),
}).insertBefore($('#pt-mytalk'));
/**
* Extra buttons in toolbar
* @stats [[File:Krinkle_InsertWikiEditorButton.js]]
*/
$.ajax({
url: '//localhost:8001/index.php?title=MediaWiki:InsertWikiEditorButton.js&action=raw&ctype=text/javascript',
dataType: 'script',
cache: true
}).done(function () {
// Happy face
krInsertWikiEditorButton({
id: "mw-text-blue",
icon: "/images/BoutonsDefaut03.png",
label: 'make-text-blue',
insertBefore: '<font color="blue">',
insertAfter: '</font>',
sampleText: 'past your text'
});
// RED
krInsertWikiEditorButton({
id: 'mw-text-red',
icon: '/images/redtext.png',
label: 'make-text-red',
insertBefore: '<font color="#de0000">',
insertAfter: '</font>',
sampleText: 'past your text'
});
// DISPLAY TITLE
krInsertWikiEditorButton({
id: 'mw-display-title',
icon: '/images/BoutonsDefaut03.png',
label: 'DISPLAY TITLE',
insertBefore: "{{DISPLAYTITLE:",
insertAfter: "}}",
sampleText: 'past your text'
});
});