MediaWiki:ToolbarOld.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.
mw.util.addCSS( '#gadget-toolbar { white-space:nowrap; } \
	#gadget-toolbar img { height:20px; background-color:#bce; border:1px outset #bce; margin-right:1px; }' );

mw.loader.using( 'mediawiki.toolbar', function() {

	mw.toolbar.addButtons( [
		{
			speedTip: 'ДӀасахьажорг',
			imageFile: wgImg( 'ru/1/1d/Button_redirect_rus.png' ),
			tagOpen: '#REDIRECT [[',
			sampleText: 'Хьажочу агӀона цӀе',
			tagClose: ']]'
		},
		{
			speedTip: 'Категори',
			imageFile: wgImg( 'commons/3/3c/Button_cat_ru.png' ),
			tagOpen: '[\[Категори:',
			sampleText: '',
			tagClose: ']]\n'
		},
		{
			speedTip: 'Коммент',
			imageFile: wgImg( 'en/3/34/Button_hide_comment.png' ),
			tagOpen: '<!-- ',
			sampleText: 'Коммент',
			tagClose: ' -->'
		},
		{
			speedTip: 'Шуьйра цитата',
			imageFile: wgImg( 'en/f/fd/Button_blockquote.png' ),
			tagOpen: '<blockquote>\n',
			sampleText: 'Шуьйра цитата цхьам могӀамца',
			tagClose: '\n</blockquote>'
		},
		{
			speedTip: 'Чуйилла таблицу',
			imageFile: wgImg( 'en/6/60/Button_insert_table.png' ),
			tagOpen: '{| class="wikitable"\n|',
			sampleText: '-\n! корта 1\n! корта 2\n! корта 3\n|-\n| могӀа 1, чоь 1\n| могӀа 1, ячейка 2\n| могӀа 1, чоь 3\n|-\n| могӀа 2, чоь 1\n| могӀа 2, чоь 2\n| могӀа 2, чоь 3',
			tagClose: '\n|}'
		},
		{
			speedTip: 'ТӀетовжарг',
			imageFile: wgImg( 'commons/7/79/Button_reflink.png' ),
			tagOpen: '<ref\>',
			sampleText: 'Кхуза тӀетовжорган йоза дилла',
			tagClose: '</ref>'
		}
	] );

	setTimeout( _thumb, 2000 );

	function _thumb() {
		$( '#mw-editbutton-image' )
			.off( 'click' )
			.click( function() {
				mw.toolbar.insertTags( '[[Файл:', '|thumb]]', 'Example.jpg' );
				return false;
			})
	}

});

mw.log.deprecate( window, 'addCustomButton', function ( i, t, o, c, s ) {
	mw.toolbar.addButton( wgImg( i ), t, o, c, s );
}, 'Use mw.toolbar.addButton instead.' );