Module:Effective protection level: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
test content models rather than page names, to match MediaWiki
(avoid calling the parser unnecessarily)
(test content models rather than page names, to match MediaWiki)
Line 27:
if title.namespace == 8 then -- MediaWiki namespace
return 'sysop'
elseif title.namespace == 2 and ( mwtitle.ustring.find(contentModel pagename,== '/.*%.js$javascript') or mwtitle.ustring.find(contentModel pagename,== '/.*%.css$') ) then -- user .jsJS or .cssCSS page
return 'sysop'
end
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu