MediaWiki:Common.js: Difference between revisions
| IssuePress (talk | contribs)  (Created page with "→Any JavaScript here will be loaded for all users on every page load.:  mw.loader.using(["mediawiki.util"], function () {     $(document).ready(function () {         $("h2").each(function () {             if ($(this).text().trim() === "Steps") {                 $(this).css("color", "blue");             }         });     }); });") | IssuePress (talk | contribs)  No edit summary | ||
| Line 1: | Line 1: | ||
| /* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
| document.addEventListener("DOMContentLoaded", function () { | |||
|      document.querySelectorAll("h2").forEach(function (header) { | |||
|         if (header.textContent.trim() === "Steps") { | |||
|             header.style.color = "blue"; | |||
|          } | |||
|          } | |||
|      }); |      }); | ||
| }); | }); | ||