MediaWiki:Common.js: различия между версиями

Материал из Кафедра ИУ5 МГТУ им. Н.Э.Баумана, студенческое сообщество
Перейти к навигации Перейти к поиску
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
/* Размещённый здесь JavaScript код будет загружаться всем пользователям при обращении к каждой странице */
/* Размещённый здесь JavaScript код будет загружаться всем пользователям при обращении к каждой странице */


 
var customizeToolbar = function()
var customizeToolbar = function() {/* Your code goes here */};
{
/* Your code goes here */
};


/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar . . . */if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) {mw.loader.using( 'user.options', function () {if ( mw.user.options.get('usebetatoolbar') ) {mw.loader.using( 'ext.wikiEditor.toolbar', function () {$(document).ready( customizeToolbar );} );}} );}
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar . . . */if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) {mw.loader.using( 'user.options', function () {if ( mw.user.options.get('usebetatoolbar') ) {mw.loader.using( 'ext.wikiEditor.toolbar', function () {$(document).ready( customizeToolbar );} );}} );}

Версия от 17:21, 16 ноября 2012

/* Размещённый здесь JavaScript код будет загружаться всем пользователям при обращении к каждой странице */

var customizeToolbar = function()
{
/* Your code goes here */
};

/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar . . . */if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) {mw.loader.using( 'user.options', function () {if ( mw.user.options.get('usebetatoolbar') ) {mw.loader.using( 'ext.wikiEditor.toolbar', function () {$(document).ready( customizeToolbar );} );}} );}