8,279
edits
No edit summary |
No edit summary Tag: Reverted |
||
Line 79: | Line 79: | ||
end | end | ||
local sprite = mw.html.create( 'span' ):addClass( 'sprite-file' ) | local sprite = mw.html.create( 'span' ):addClass( 'sprite-file' ) | ||
local img = '[[File:' .. file .. '|' .. size .. '|link=' .. link .. '|alt=' .. altText .. '|class=pixel-image|' .. ( | if args.title ~= nil then -- <------ this part is new | ||
title = args.title | |||
if string.find(title, "parallel:") then | |||
title = mw.ustring.gsub( title, "[Pp]arallel:", "" ) | |||
else | |||
title = title .. ' (Vanilla)' | |||
end | |||
local img = '[[File:' .. file .. '|' .. size .. '|link=' .. link .. '|alt=' .. altText .. '|class=pixel-image|' .. ( title ) .. ']]' | |||
else | |||
local img = '[[File:' .. file .. '|' .. size .. '|link=' .. link .. '|alt=' .. altText .. '|class=pixel-image|' .. ( '' ) .. ']]' | |||
end | |||
sprite:node( img ) | sprite:node( img ) | ||