MediaWiki:Common.js: Difference between revisions

m Protected "MediaWiki:Common.js" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
No edit summary
Tag: Manual revert
 
(7 intermediate revisions by the same user not shown)
Line 39: Line 39:
         if (container) {
         if (container) {
             container.innerHTML = 'Unable to load recent pages.';
             container.innerHTML = 'Unable to load recent pages.';
        }
    });
});
mw.loader.using('jquery', function () {
    $(function () {
        if (!$('#promo-banner').length) {
            var promoContainer = $('<div id="promo-banner-container"></div>');
            var promo = $('<div id="promo-banner">Want to rank your website at the top of Google? Or need expert SEO services to boost your business? <br>🚀 <a href="https://www.upwork.com/freelancers/eliteseoexpert" target="_blank">Hire me on Upwork</a> now and let’s grow your traffic!</div>');
            promoContainer.append(promo);
            // Add it right under the header in Vector 2022
            var headerArea = $('.vector-header-container');
            if (headerArea.length) {
                headerArea.after(promoContainer);
            }
         }
         }
     });
     });
});
});