Module:Contacts Mobile

local cardList = {}

function cardList.add(frame) -- iterate input into array local contact = {} for i = 1, 100 do       contact[i] = frame:getParent.args[i] end

local cardName = "" -- formats card name for i = 1, table.getn(contact) do       cardName = contact[i] if string.find(cardName, "\n\n") then cardName = string.gsub(cardName, "\n\n", "") else cardName = string.gsub(cardName, "\n", "") end

if string.find(cardName, "%(Pride%)") then contact[i] = "" ..                       string.sub(cardName, 1, string.find(cardName, "%(Pride%)") - 2) .. " " elseif string.find(cardName, "%(Greed%)") then contact[i] = "" ..                       string.sub(cardName, 1, string.find(cardName, "%(Greed%)") - 2) .. " " elseif string.find(cardName, "%(Envy%)") then contact[i] = "" .. string.sub(cardName, 1, string.find(cardName, "%(Envy%)") - 2) .. " " elseif string.find(cardName, "%(Wrath%)") then contact[i] = "" ..                       string.sub(cardName, 1, string.find(cardName, "%(Wrath%)") - 2) .. " " elseif string.find(cardName, "%(Lust%)") then contact[i] = "" .. string.sub(cardName, 1, string.find(cardName, "%(Lust%)") - 2) .. " " elseif string.find(cardName, "%(Gluttony%)") then contact[i] = "" ..                       string.sub(cardName, 1, string.find(cardName, "%(Gluttony%)") - 2) ..                            " " elseif string.find(cardName, "%(Sloth%)") then contact[i] = "" ..                       string.sub(cardName, 1, string.find(cardName, "%(Sloth%)") - 2) .. " " else contact[i] = "" .. cardName .. "" end end

-- starts the table local html = ' " end return cardList

--