Jump to content

MediaWiki:Common.js: Difference between revisions

From CAMIH
No edit summary
No edit summary
Tag: Manual revert
 
(2 intermediate revisions by the same user not shown)
(No difference)

Latest revision as of 12:10, 21 August 2024

/* Any JavaScript here will be loaded for all users on every page load. */

$(document).ready(function() {
    $('table.wikitable td').each(function() {
        var cellContent = $(this).text().trim();
        if (cellContent === 'low risk') {
            $(this).addClass('low-risk');
        } else if (cellContent === 'some concerns') {
            $(this).addClass('some-concerns');
        } else if (cellContent === 'high risk') {
            $(this).addClass('high-risk');
        }
    });
});