« MediaWiki:Common.js » : différence entre les versions

aucun résumé des modifications
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
/* Tout JavaScript présent ici sera exécuté par tous les utilisateurs à chaque chargement de page. */
/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */
/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */


Ligne 913 : Ligne 912 :


/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
customizeToolbar;
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
if (mw.config.get('wgAction') === 'edit') {
mw.loader.using( 'user.options' ).then( function () {
mw.loader.using( 'user.options' ).then( function () {
// This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])
// This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])