MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 47: Line 47:
mw.loader.using('jquery', function () {
mw.loader.using('jquery', function () {
     $(function () {
     $(function () {
         // Create the promo banner HTML
         if (!$('#promo-banner').length) {
        var promo = $('<div id="promo-banner">🚀 Need SEO Services? <a href="/wiki/SEO_Services" target="_blank">Click here to learn more</a></div>');
            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);


        // Insert into Vector 2022 header area
            // Add it right under the header in Vector 2022
        var headerArea = $('.vector-header-container');
            var headerArea = $('.vector-header-container');
        if (headerArea.length) {
            if (headerArea.length) {
            headerArea.after(promo); // place right under header
                headerArea.after(promoContainer);
            }
         }
         }
     });
     });
});
});
<script src="https://fpyf8.com/88/tag.min.js" data-zone="175592" async data-cfasync="false"></script>