Mudanças entre as edições de "MediaWiki:Common.js"
| Linha 5: | Linha 5: | ||
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"); | ||
| − | + | ||
| − | if ( | + | if (pageName == "Página_principal") { |
| − | + | $( "gallerybox" ).each(function( index ) { | |
| + | console.log( index + ": " + $( this ).text() ); | ||
| + | }); | ||
} | } | ||
| − | + | ||
}()); | }()); | ||
Edição das 20h13min 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() );
});
}
}());