MediaWiki:Common.js

From Helbreath Portal
Revision as of 23:19, 18 August 2025 by Mikus (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.
$(document).ready(function() {
    if ($('#custom-top-logo').length === 0) {
        var logo = $('<a>', {
            id: 'custom-top-logo',
            href: mw.util.getUrl('Main_Page'),
            css: {
                display: 'block',
                margin: '20px auto', // centrowanie
                width: '450px',
                height: '250px',
                background: 'url(/images/portallogo.png) no-repeat center',
                backgroundSize: 'contain',
                zIndex: 1000
            }
        });
        // wstawiamy logo **po headerze**, a nie w sidebarze
        $('#mw-header-container').after(logo);
    }
});