MediaWiki:Common.js: Difference between revisions

From Ikwipedia
No edit summary
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() {
    var footnotes = document.querySelectorAll("sup.reference a");
    footnotes.forEach((fn, index) => {
        const letter = String.fromCharCode(97 + index); // 'a' for 0, 'b' for 1, etc.
        fn.textContent = `[${letter}]`;
    });
});

Revision as of 07:53, 5 November 2024

/* Any JavaScript here will be loaded for all users on every page load. */
document.addEventListener("DOMContentLoaded", function() {
    var footnotes = document.querySelectorAll("sup.reference a");
    footnotes.forEach((fn, index) => {
        const letter = String.fromCharCode(97 + index); // 'a' for 0, 'b' for 1, etc.
        fn.textContent = `[${letter}]`;
    });
});