MediaWiki

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)).textContent;
console.log($(element));
             if ($(element).textContent === 'N') $(element).parentElement.style.color ='red';
             if ($(element).textContent === 'N') $(element).parentElement.style.color ='red';

Revision as of 13:16, 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));
            if ($(element).textContent === 'N') $(element).parentElement.style.color ='red';
			
		});
		
	}
});