MediaWiki:Vector.js: Difference between revisions

From PenguinMod Wiki
Jump to navigation Jump to search
Content added Content deleted
(Created page with "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"); parserOu...")
 
No edit summary
 
Line 1: Line 1:
console.log("running vector-exclusive js...")
document.addEventListener("DOMContentLoaded", function() {
document.addEventListener("DOMContentLoaded", function() {
// Check if the URL contains "User:"
// Check if the URL contains "User:"

Latest revision as of 22:28, 17 June 2024

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);
            }
        }
    }
});