Mudanças entre as edições de "MediaWiki:Common.js"
| Linha 11: | Linha 11: | ||
$( ".gallerybox" ).each(function( index ) { | $( ".gallerybox" ).each(function( index ) { | ||
console.log( index + ": " + $( this ).text() ); | console.log( index + ": " + $( this ).text() ); | ||
| − | $( this ).addClass("hide-anonymous"); | + | if (index != 0) { |
| + | $( this ).addClass("hide-anonymous"); | ||
| + | } | ||
}); | }); | ||
Edição das 20h20min de 21 de março de 2019
/* Códigos JavaScript aqui colocados serão carregados por todos aqueles que acessarem alguma página deste wiki */
$(function () {
var st = mw.config;
console.log(st.get("wgArticleId"));
console.log(st.get("wgPageName"));
var pageName = st.get("wgPageName");
if (pageName == "Página_principal") {
$( ".gallerybox" ).each(function( index ) {
console.log( index + ": " + $( this ).text() );
if (index != 0) {
$( this ).addClass("hide-anonymous");
}
});
}
}());