MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 69: Line 69:
         var rows = $('[class^="colortable-"] td b:contains("' + rowContent + '")');
         var rows = $('[class^="colortable-"] td b:contains("' + rowContent + '")');
         rows.each(function () {
         rows.each(function () {
             if ($(this).parents('td')[0].textContent == rowContent) $(this).parent().addClass('tone-4');
             const textContent = $(this).parents('td')[0].textContent.trim();
            if (textContent == rowContent) $(this).parent().addClass('tone-4');
         })
         })
     })
     })