Mudanças entre as edições de "MediaWiki:Common.js"
| (2 revisões intermediárias pelo mesmo usuário não estão sendo mostradas) | |||
| Linha 3: | Linha 3: | ||
$(function () { | $(function () { | ||
var st = mw.config; | var st = mw.config; | ||
| − | console.log(st.get("wgArticleId")); | + | /* console.log(st.get("wgArticleId")); |
| − | console.log(st.get("wgPageName")); | + | console.log(st.get("wgPageName")); */ |
var pageName = st.get("wgPageName"); | var pageName = st.get("wgPageName"); | ||
| Linha 10: | Linha 10: | ||
if (pageName == "Página_principal") { | if (pageName == "Página_principal") { | ||
$( ".gallerybox" ).each(function( index ) { | $( ".gallerybox" ).each(function( index ) { | ||
| − | console.log( index + ": " + $( this ).text() ); | + | /* console.log( index + ": " + $( this ).text() ); */ |
| + | if (index != 0) { | ||
| + | $( this ).addClass("hide-anonymous"); | ||
| + | } | ||
| + | |||
}); | }); | ||
} | } | ||
Edição atual tal como às 20h28min 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");
}
});
}
}());