Jump to content

Module:Effective protection level: Difference between revisions

test content models rather than page names, to match MediaWiki
Enwikipedia>Jackmcbarn
(avoid calling the parser unnecessarily)
Enwikipedia>Jackmcbarn
(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
Cookies help us deliver our services. By using our services, you agree to our use of cookies.