Jump to content

MediaWiki:Common.js

From Megabonk Wiki
Revision as of 12:36, 24 November 2025 by MegaAdmin (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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
mw.loader.using(['mediawiki.util'], function () {
    $(function () {

        if (!window.nitroAds || !window.nitroAds.createAd) return;

        var $container = $('.vector-body');

        if (!$container.length) return;

        if ($('#megabonk_top_banner').length) return;

        var adId = 'megabonk_top_banner';

        var $adDiv = $('<div>', {
            id: adId,
            class: 'nitro-top-banner'
        }).css({
            'margin': '10px 0 20px 0',
            'text-align': 'center'
        });

        $container.prepend($adDiv);

        window.nitroAds.createAd(adId, {
            sizes: [
                [728, 90],
                [970, 90],
                [970, 250],
                [320, 100],
                [320, 50]
            ],
            geoDeny: ['RU']
        });
    });
});