MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 14: Line 14:


// Add extra info to infobox's cost header to notify users to take it with a grain of salt
// Add extra info to infobox's cost header to notify users to take it with a grain of salt
const headers = document.querySelectorAll('.pi-header');
var headers = document.querySelectorAll('.pi-header');


if (headers) {
if (headers) {
     headers.forEach(function(header) {
     headers.forEach(function(header) {
         const paragraph = header.querySelector('p');
         var paragraph = header.querySelector('p');


         if (paragraph.textContent.includes('Cost')) {
         if (paragraph.textContent.includes('Cost')) {