Module:Crafting: Difference between revisions

Jump to navigation Jump to search
I know this won't work, but I wonder what the heck it does
m (How about this)
(I know this won't work, but I wonder what the heck it does)
Line 101: Line 101:
local inline = args['inline'] or args['Inline']
local inline = args['inline'] or args['Inline']
local spriteDiv
local spriteDiv
local parentDiv
local parentDiv = mw.html.create("a")
if inline ~= 'false' then
if inline ~= 'false' then
spriteDiv = sprite:GenerateHTML("span")
spriteDiv = sprite:GenerateHTML("span")
spriteDiv:css("display","inline-block")
spriteDiv:css("display","inline-block")
spriteDiv:css("vertical-align","middle")
spriteDiv:css("vertical-align","middle")
parentDiv = mw.html.create("span")
else
else
spriteDiv = sprite:GenerateHTML()
spriteDiv = sprite:GenerateHTML()
parentDiv = mw.html.create("span")
end
end


Line 125: Line 123:


parentDiv:node(spriteDiv)
parentDiv:node(spriteDiv)
local link = args['link'] or args['Link']
if link then
parentDiv:attr('href',link)
end


return parentDiv
return parentDiv
184

edits

Navigation menu