MediaWiki:Common.js: Difference between revisions
Appearance
Created page with "→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-ris..." |
No edit summary |
||
Line 10: | Line 10: | ||
} else if (cellContent === 'high risk') { | } else if (cellContent === 'high risk') { | ||
$(this).addClass('high-risk'); | $(this).addClass('high-risk'); | ||
} | } | ||
}); | }); | ||
}); | }); |
Revision as of 12:05, 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'); } }); });