Jump to content

MediaWiki:Common.js: Difference between revisions

From Ourwiki
Created page with "Any JavaScript here will be loaded for all users on every page load.: document.addEventListener("DOMContentLoaded", function() { let count = 0; let target = 120; // change to your article count let counter = document.getElementById("articleCount"); let interval = setInterval(function() { count++; counter.innerText = count; if(count >= target) clearInterval(interval); }, 20); });"
 
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() {
    let count = 0;
    let target = 120; // change to your article count
    let counter = document.getElementById("articleCount");
    let interval = setInterval(function() {
        count++;
        counter.innerText = count;
        if(count >= target) clearInterval(interval);
    }, 20);
});

Latest revision as of 21:23, 20 February 2026

/* Any JavaScript here will be loaded for all users on every page load. */