模組:Indicator
外观
--模块控制indicator功能
local z = {}
function z.main( frame )
local args = require('Module:Arguments').getArgs
local text
if args.image and args.image ~= '' then
text = '[[File:' .. args.image .. '|' .. args.size .. '|' .. args.alt .. '|link=' .. args.link .. ']]'
end
if args.text and args.text ~= '' then
text = text .. args.text
end
if args.title and args.title ~= '' then
text = tostring( mw.html.create( 'div' ):attr( 'title', args.title ):wikitext( text ) )
end
return frame:extensionTag{
name = 'indicator',
content = text,
args = { name = string.format( '%x', require( 'Module:Crc32lua' ).crc32( text ) ) },
}
end
return z