MediaWiki:Common.js: Difference between revisions

From Riverview Legal Group
Access restrictions were established for this page. If you see this message, you have no access to this page.
mNo edit summary
m (Blanked the page)
Tag: Blanking
 
(15 intermediate revisions by one other user not shown)
Line 1: Line 1:
mw.loader.using(['mediawiki.user']).then(function () {
    $(document).ready(function () {
        var loggedInUser = mw.config.get('wgUserName');
        console.log("Logged-in User:", loggedInUser);


        // Only show the popup if no user is logged in
        if (!loggedInUser) {
            showPopup();
        }
    });
    function showPopup() {
        var popup = $('<div id="popup-overlay">' +
            '<div id="popup-box">' +
            '<h2>Free Legal Consultation <br> Riverview Legal Group (Ontario)</h2>' +
            '<p>Our primary focus is the Ontario Landlord and Tenant Board.</p>' +
            '<p>Call us for help at (888) 655-1076</p>' +
            '<a href="https://riverview.legal/about-us/" target="_blank" class="popup-button">Book a Consultation</a>' +
            '<span id="popup-close">×</span>' +
            '</div>' +
            '</div>');
        $("body").append(popup);
        $("#popup-close").click(function () {
            $("#popup-overlay").fadeOut();
        });
    }
});

Latest revision as of 02:05, 2 March 2025