Anonymous user
Module:UserLinks: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
make an example-creating function
(change category name) |
(make an example-creating function) |
||
Line 406:
return result
end
local function getExampleLinks(args)
-- This function enables example output without having to specify any
-- parameters to #invoke.
args.demo = 'yes'
args.user = 'Example'
args.User = nil
return getLinks(args)
end
local function makeWrapper(func)
Line 441 ⟶ 450:
main = makeWrapper(getLinks),
single = makeWrapper(getSingleLink),
linktable = makeWrapper(getLinkTable),
example = makeWrapper(getExampleLinks)
}
|