MediaWiki:Citizen.js: Difference between revisions

MediaWiki interface page
No edit summary
Tag: Manual revert
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
elements.each(function() {
 
elements.each(function() {
 
var $element = $(this);
 
var $element = $(this);
var loginMessage = '<p>Please <a href="/wiki/Special:UserLogin">login</a> or <a href="/wiki/Special:CreateAccount">sign up</a> to continue.</p>';
+
var loginMessage = '<p style="cs-custom-login-prompt">Please <a href="/wiki/Special:UserLogin">login</a> or <a href="/wiki/Special:CreateAccount">sign up</a> to continue.</p>';
 
$element.after(loginMessage);
 
$element.after(loginMessage);
 
});
 
});

Latest revision as of 01:31, 15 October 2023

$(document).ready(function() {
    setTimeout(function() {
        if (mw.user.isAnon()) {
            var elements = $('.cs-header > .oo-ui-widget-disabled');
            elements.each(function() {
                var $element = $(this);
                var loginMessage = '<p style="cs-custom-login-prompt">Please <a href="/wiki/Special:UserLogin">login</a> or <a href="/wiki/Special:CreateAccount">sign up</a> to continue.</p>';
                $element.after(loginMessage);
            });
        }
    }, 250);
});