MediaWiki:Common.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* Any JavaScript here will be loaded for all users on every page load. */
document.addEventListener("DOMContentLoaded",function(){var e=document.querySelector("h2 > #Steps");console.log("Steps header:",e);if(e){var t=e.parentElement.nextElementSibling;console.log("Adjacent ordered list:",t);if(t&&t.tagName==="OL"){var n=t.querySelectorAll("li");for(var o=0;o<n.length;o++){var c=n[o];console.log("Processing <li> "+(o+1)+":",c.textContent.trim());var l=c.textContent.trim(),s=l.indexOf(".")+1;if(s>0){var i=l.slice(0,s),r=l.slice(s).trim();c.innerHTML="<strong>"+i+"</strong> "+r,console.log("Updated <li> "+(o+1)+":",c.innerHTML)}else console.log("No sentence found in <li> "+(o+1))}}else console.log("No <ol> found as the adjacent sibling of #Steps")}else console.log("No h2 > #Steps element found")});