MediaWiki:Common.js

From Helbreath Portal
Revision as of 23:09, 18 August 2025 by Mikus (talk | contribs)

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) {
        // wstawiamy logo **po headerze** i search boxie
        var logo = $('<a>', {
            id: 'custom-top-logo',
            href: mw.util.getUrl('Main_Page'),
            css: {
                display: 'block',
                margin: '10px auto 20px auto', // trochę odstępu od search boxa
                width: '250px',
                height: '100px',
                background: 'url(/images/portallogo.png) no-repeat center',
                backgroundSize: 'contain',
                zIndex: 1000
            }
        });

        // wstawiamy logo po #p-search (search box)
        $('#p-search').after(logo);
    }
});