Module:Soreness

From Growtopia
Revision as of 13:51, 20 November 2024 by >Sorenesss
Jump to navigationJump to search

Documentation for this module may be created at Module:Soreness/doc

local p = {}

function p.test(frame)
    local class = {}
    table.insert(class, "growsprite")

    local newwidth = frame.args[2] or "32"
    local file = frame.args[1] or "Bingo_Card.png"

    local imgTag = mw.getCurrentFrame():preprocess("{{filepath:"..file.."}}"):match("([^?]+)%?(.+)")[1]..'/revision/latest/scale-to-width-down/'..newwidth

    return "<span class='" .. table.concat(class, " ") .. "'>" .. imgTag .. "</span>[[Category:AutoPurge]]"
end
 
return p