MediaWiki:Vector.js

From PenguinMod Wiki
Revision as of 22:28, 17 June 2024 by G1nX (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.
console.log("running vector-exclusive js...")
document.addEventListener("DOMContentLoaded", function() {
    // Check if the URL contains "User:"
    if (window.location.href.includes("User:")) {
        // Select the div with id mw-parser-output
        var parserOutputDiv = document.getElementById("mw-parser-output");
        
        if (parserOutputDiv) {
            // Create 5 <br> elements
            for (var i = 0; i < 5; i++) {
                var br = document.createElement("br");
                parserOutputDiv.insertBefore(br, parserOutputDiv.firstChild);
            }
        }
    }
});