MediaWiki:Minerva.js

Revision as of 06:39, 19 October 2025 by imported>Dawning ((by SublimeText.Mediawiker))

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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
$(document).ready(function() {
    // Hide default footer
    $('#p-lang, .minerva-footer-logo, #footer-info, #footer-places').hide();
    
    // Add custom footer sections
    addFooterSection('About', [
        { url: mw.util.getUrl('Main_Page'), text: 'Home' },
        { url: mw.util.getUrl('Telos_Realms_Wiki:About'), text: 'About' },
        { url: mw.util.getUrl('Help:Contents'), text: 'Help' }
    ]);
    
    addFooterSection('Legal', [
        { url: mw.util.getUrl('Telos_Realms_Wiki:Privacy'), text: 'Privacy Policy' },
        { url: mw.util.getUrl('Telos_Realms_Wiki:Terms'), text: 'Terms of Service' }
    ]);
    
    addFooterSection('Community', [
        { url: 'https://discord.gg/yourserver', text: 'Discord' },
        { url: 'https://twitter.com/yourhandle', text: 'Twitter' }
    ]);
});

function addFooterSection(title, links) {
    var portletId = 'footer-' + title.toLowerCase();
    
    var section = $('<div>').attr('id', portletId).addClass('footer-section');
    var heading = $('<h4>').text(title);
    section.append(heading);
    
    $('.post-content.footer-content').append(section);
    
    links.forEach(function(link) {
        mw.util.addPortletLink(portletId, link.url, link.text);
    });
}