Más acciones
Sin resumen de edición |
Sin resumen de edición |
||
Línea 8: | Línea 8: | ||
// barra de progreso | // barra de progreso | ||
if ( mw.config.get( 'wgPageName' ) === 'Usuario:Hasley/ | if ( mw.config.get( 'wgPageName' ) === 'Usuario:Hasley/b' ) { | ||
$.when( $.ready, mw.loader.using( [ 'oojs-ui' ] ) ).then( function () { | $.when( $.ready, mw.loader.using( [ 'oojs-ui' ] ) ).then( function () { | ||
barId = 1; | barId = 1; | ||
barId2 = 2; | |||
barId3 = 3; | |||
barId4 = 4; | |||
barId5 = 5; | |||
var number = $( '#progress-bar-' + barId ).attr( 'data-id-' + barId ); | var number = $( '#progress-bar-' + barId ).attr( 'data-id-' + barId ); | ||
var number2 = $( '#progress-bar-' + barId2 ).attr( 'data-id-' + barId2 ); | |||
var number3 = $( '#progress-bar-' + barId3 ).attr( 'data-id-' + barId3 ); | |||
var number4 = $( '#progress-bar-' + barId4 ).attr( 'data-id-' + barId4 ); | |||
var number5 = $( '#progress-bar-' + barId5 ).attr( 'data-id-' + barId5 ); | |||
var progressBar = new OO.ui.ProgressBarWidget( { | var progressBar = new OO.ui.ProgressBarWidget( { | ||
progress: number | progress: number | ||
} ); | |||
var progressBar2 = new OO.ui.ProgressBarWidget( { | |||
progress: number2 | |||
} ); | } ); | ||
var progressBar3 = new OO.ui.ProgressBarWidget( { | |||
progress: number3 | |||
} ); | |||
var progressBar4 = new OO.ui.ProgressBarWidget( { | |||
progress: number4 | |||
} ); | |||
var progressBar5 = new OO.ui.ProgressBarWidget( { | |||
progress: number5 | |||
} ); | |||
progressBar.$element.css({ | progressBar.$element.css({ | ||
borderRadius: '.2rem', | borderRadius: '.2rem', | ||
Línea 25: | Línea 49: | ||
}); | }); | ||
if ( progressBar.progress < 100 ) { | progressBar2.$element.css({ | ||
borderRadius: '.2rem', | |||
margin: '0 auto', | |||
}); | |||
progressBar3.$element.css({ | |||
borderRadius: '.2rem', | |||
margin: '0 auto', | |||
}); | |||
progressBar4.$element.css({ | |||
borderRadius: '.2rem', | |||
margin: '0 auto', | |||
}); | |||
progressBar5.$element.css({ | |||
borderRadius: '.2rem', | |||
margin: '0 auto', | |||
}); | |||
if ( ( progressBar.progress || progressBar2.progress || | |||
progressBar3.progress || progressBar4.progress || | |||
progressBar5.progress ) < 100 ) { | |||
progressBar.pushPending(); | |||
progressBar2.pushPending(); | |||
progressBar3.pushPending(); | |||
progressBar4.pushPending(); | |||
progressBar5.pushPending(); | |||
} | } | ||
$( '#progress-bar-' + barId ).append( progressBar.$element ); | $( '#progress-bar-' + barId ).append( progressBar.$element ); | ||
$( '#progress-bar-' + barId2 ).append( progressBar2.$element ); | |||
$( '#progress-bar-' + barId3 ).append( progressBar3.$element ); | |||
$( '#progress-bar-' + barId4 ).append( progressBar4.$element ); | |||
$( '#progress-bar-' + barId5 ).append( progressBar5.$element ); | |||
} ); | } ); | ||
} | } |
Revisión del 00:43 12 ene 2022
// ocultar mw-pt-translate-header para los anónimos
mw.loader.using( [ 'mediawiki.user' ], function ( ) {
if ( mw.user.isAnon() == 1 ) {
mw.util.addCSS( '.mw-pt-translate-header {display:none}' );
}
} );
// barra de progreso
if ( mw.config.get( 'wgPageName' ) === 'Usuario:Hasley/b' ) {
$.when( $.ready, mw.loader.using( [ 'oojs-ui' ] ) ).then( function () {
barId = 1;
barId2 = 2;
barId3 = 3;
barId4 = 4;
barId5 = 5;
var number = $( '#progress-bar-' + barId ).attr( 'data-id-' + barId );
var number2 = $( '#progress-bar-' + barId2 ).attr( 'data-id-' + barId2 );
var number3 = $( '#progress-bar-' + barId3 ).attr( 'data-id-' + barId3 );
var number4 = $( '#progress-bar-' + barId4 ).attr( 'data-id-' + barId4 );
var number5 = $( '#progress-bar-' + barId5 ).attr( 'data-id-' + barId5 );
var progressBar = new OO.ui.ProgressBarWidget( {
progress: number
} );
var progressBar2 = new OO.ui.ProgressBarWidget( {
progress: number2
} );
var progressBar3 = new OO.ui.ProgressBarWidget( {
progress: number3
} );
var progressBar4 = new OO.ui.ProgressBarWidget( {
progress: number4
} );
var progressBar5 = new OO.ui.ProgressBarWidget( {
progress: number5
} );
progressBar.$element.css({
borderRadius: '.2rem',
margin: '0 auto',
});
progressBar2.$element.css({
borderRadius: '.2rem',
margin: '0 auto',
});
progressBar3.$element.css({
borderRadius: '.2rem',
margin: '0 auto',
});
progressBar4.$element.css({
borderRadius: '.2rem',
margin: '0 auto',
});
progressBar5.$element.css({
borderRadius: '.2rem',
margin: '0 auto',
});
if ( ( progressBar.progress || progressBar2.progress ||
progressBar3.progress || progressBar4.progress ||
progressBar5.progress ) < 100 ) {
progressBar.pushPending();
progressBar2.pushPending();
progressBar3.pushPending();
progressBar4.pushPending();
progressBar5.pushPending();
}
$( '#progress-bar-' + barId ).append( progressBar.$element );
$( '#progress-bar-' + barId2 ).append( progressBar2.$element );
$( '#progress-bar-' + barId3 ).append( progressBar3.$element );
$( '#progress-bar-' + barId4 ).append( progressBar4.$element );
$( '#progress-bar-' + barId5 ).append( progressBar5.$element );
} );
}