ArticleOverviewScript.js: Difference between revisions
From Mark Twain in the German Language Press
mNo edit summary |
mNo edit summary |
||
| Line 5: | Line 5: | ||
console.log('loading'); | console.log('loading'); | ||
$('td.type').each(function(index, element) { | $('td.type').each(function(index, element) { | ||
console.log($(element)); | console.log($(element).innerText); | ||
if ($(element). | console.log($(element).parentElement.innerText); | ||
if ($(element).innerText === 'N') $(element).parentElement.style.color ='red'; | |||
}); | }); | ||
Revision as of 13:18, 11 August 2025
mw.hook( 'wikipage.content' ).add( ( $content ) => {
const $target = $content.find( '#articleOverview' );
if ( $target.length ) {
var $table = $target;
console.log('loading');
$('td.type').each(function(index, element) {
console.log($(element).innerText);
console.log($(element).parentElement.innerText);
if ($(element).innerText === 'N') $(element).parentElement.style.color ='red';
});
}
});