Туружаачы:Radmir Far/warnings.js
Ајарту: Јарлаган кийнинде, солынтыларды кӧрӧргӧ браузердиҥ кешин арчырга келижер.
- Firefox / Safari: Јаба былчыыр керек Shift јепселдердиҥ панели Јаҥыртар, эмезе былчып ийер Ctrl-F5 эмезе Ctrl-R (⌘-R Mac компьютерде)
- Google Chrome: Былчыгар Ctrl-Shift-R (⌘-Shift-R Mac компьютерде)
- Internet Explorer / Edge: Јаба былчып тудала Ctrl былчыгар Јаҥыртар, эмезе былчыгар Ctrl-F5
- Opera: Базар Ctrl-F5
//<nowiki>
// Основано на U:OneLittleMouse/warnings.js?oldid=90449029
( function () {
function postWarn(){
var template = "{{delete|Кирлат (смесь кириллицы и латиницы). Cyrlat (mix of cyrillic and latin characters).}}";
var text = document.getElementById('wpTextbox1');
text.value = template;
}
var customizeToolbar = function () {
/*начало */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'main',
'group': 'insert',
'tools': {
'warnbuttons': {
label: 'КБУ кирлат', // or use labelMsg for a localized label, see above
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/8/83/Toolbaricon_regular_k.png',
action: {
type: 'callback',
execute: function(context){
postWarn();
}
}
}
}
} );
/*конец*/
};
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {
mw.loader.using( 'user.options' ).then( function () {
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
$.when(
mw.loader.using( 'ext.wikiEditor' ), $.ready
).then( customizeToolbar );
}
} );
}
}() );
/* </nowiki>*/