Module:Documentation: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Revert recent imported edits whose sole effect was to add support for templates that don't exist on Miraheze meta
m (3 revisions imported: Importing Template:Help me, Template:Admin help, and related templates from the English Wikipedia)
(Revert recent imported edits whose sole effect was to add support for templates that don't exist on Miraheze meta)
Line 112:
 
----------------------------------------------------------------------------
-- EntryMain pointsfunction
----------------------------------------------------------------------------
 
function p.nonexistent(frame)
if mw.title.getCurrentTitle().subpageText == 'testcases' then
return frame:expandTemplate{title = 'module test cases notice'}
else
return p.main(frame)
end
end
 
p.main = makeInvokeFunc('_main')
Line 137 ⟶ 129:
local root = mw.html.create()
root
:wikitext(p._getModuleWikitext(args, env))
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
Line 332 ⟶ 323:
-- Auxiliary templates
----------------------------------------------------------------------------
 
p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext')
 
function p._getModuleWikitext(args, env)
local currentTitle = mw.title.getCurrentTitle()
if currentTitle.contentModel ~= 'Scribunto' then return end
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
local moduleWikitext = package.loaded["Module:Module wikitext"]
if moduleWikitext then
return moduleWikitext.main()
end
end
 
function p.sandboxNotice(args, env)
0

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu