Jump to content

MediaWiki:Common.js: Difference between revisions

From nUSA Wiki
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1: Line 1:
mw.loader.using(['mediawiki.util'], function () {
$(function() {
     if ($('.protection-banner').length) {
 
         $('#content').before($('.protection-banner'));
     if (mw.config.get('wgRestrictions') && mw.config.get('wgRestrictions').edit) {
        var protectionBanner = '{{ProtectionBanner}}';
       
        // Prepend the banner to the content
         $('#content').before(protectionBanner);
     }
     }
});
});

Revision as of 03:37, 9 January 2025

$(function() {

    if (mw.config.get('wgRestrictions') && mw.config.get('wgRestrictions').edit) {
        var protectionBanner = '{{ProtectionBanner}}'; 
        
        // Prepend the banner to the content
        $('#content').before(protectionBanner);
    }
});