MediaWiki:Common.js: Difference between revisions
Appearance
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 1: | Line 1: | ||
$(function() { | |||
if ( | |||
$('#content').before( | 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); } });