Difference between revisions of "Module:Icon"

Jump to navigation Jump to search
60 bytes removed ,  16:24, 23 October 2021
no edit summary
Line 17: Line 17:


local function _requirements(resource, value, link, text)
local function _requirements(resource, value, link, text)
resource = trim(resource)
resource = string.lower(trim(resource))
mw.log(resource)
if iconList[resource] ~= nil then
mw.log(iconList[resource])
if iconList[string.lower(resource)] ~= nil then
result = '[[file:' .. iconList[resource]['file'] .. '|16px|link='
result = '[[file:' .. iconList[resource]['file'] .. '|16px|link='
if link ~= nil and link ~= '' then
if link ~= nil and link ~= '' then
Line 50: Line 48:


function p.requirements(frame)
function p.requirements(frame)
r = string.lower(frame.args['resource'])
r = frame.args['resource']
v = frame.args['value']
v = frame.args['value']
l = frame.args['link']
l = frame.args['link']

Navigation menu